Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dreveman:openSUSE:11.1:cr
cr
cr-occlude-fix.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cr-occlude-fix.diff of Package cr
commit 928b51dce6c9d3ff766e67ea58fb2c66805bd7d8 Author: David Reveman <davidr@novell.com> Date: Thu Apr 23 16:06:19 2009 -0400 Fix GL_ARB_occlusion_query support. diff --git a/glapi_parser/apiutil.py b/glapi_parser/apiutil.py index 22ddd3d..5363589 100644 --- a/glapi_parser/apiutil.py +++ b/glapi_parser/apiutil.py @@ -405,7 +405,8 @@ def SetsState(funcName): # and can be compiled. They are control functions # that are not trackable via state. if funcName in ['Bitmap', 'DeleteTextures', 'FeedbackBuffer', - 'RenderMode', 'BindBufferARB', 'DeleteFencesNV']: + 'RenderMode', 'BindBufferARB', 'DeleteFencesNV', + 'DeleteProgramsARB', 'DeleteBuffersARB', 'DeleteQueriesARB']: return 1 elif funcName in ['ExecuteProgramNV']: return 0 diff --git a/state_tracker/state_occlude.c b/state_tracker/state_occlude.c index 61e2508..4af0201 100644 --- a/state_tracker/state_occlude.c +++ b/state_tracker/state_occlude.c @@ -66,15 +66,15 @@ crStateDeleteQueriesARB(GLsizei n, const GLuint *ids) return; } - for (i = 0; i < n; i++) { - if (ids[i]) { - CROcclusionObject *q = (CROcclusionObject *) - crHashtableSearch(o->objects, ids[i]); - if (q) { - crHashtableDelete(o->objects, ids[i], crFree); - } - } + if (o->currentQueryObject) { + crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, + "glDeleteQueriesARB called in the progress of another query"); + return; } + + for (i = 0; i < n; i++) + if (ids[i]) + crHashtableDelete(o->objects, ids[i], crFree); } @@ -99,6 +99,12 @@ crStateGenQueriesARB(GLsizei n, GLuint * queries) return; } + if (o->currentQueryObject) { + crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, + "glGenQueriesARB called in the progress of another query"); + return; + } + start = crHashtableAllocKeys(o->objects, n); if (start) { GLint i; @@ -263,6 +269,12 @@ crStateBeginQueryARB(GLenum target, GLuint id) return; } + if (!id) { + crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, + "glBeginQueryARB(target)"); + return; + } + q = (CROcclusionObject *) crHashtableSearch(o->objects, id); if (q && q->active) { crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glBeginQueryARB"); diff --git a/unpacker/Makefile b/unpacker/Makefile index 6ce5158..d8fe093 100644 --- a/unpacker/Makefile +++ b/unpacker/Makefile @@ -23,6 +23,7 @@ FILES = unpack \ unpack_materials \ unpack_matrices \ unpack_misc \ + unpack_occlude \ unpack_pixelmap \ unpack_point \ unpack_program \ diff --git a/unpacker/unpack_occlude.c b/unpacker/unpack_occlude.c new file mode 100644 index 0000000..6e72d61 --- /dev/null +++ b/unpacker/unpack_occlude.c @@ -0,0 +1,10 @@ + +#include "unpacker.h" + +void crUnpackExtendDeleteQueriesARB(void) +{ + GLsizei n = READ_DATA( 8, GLsizei ); + const GLuint *ids = DATA_POINTER( 12, GLuint ); + cr_unpackDispatch.DeleteQueriesARB( n, ids ); +} + diff --git a/unpacker/unpacker_special b/unpacker/unpacker_special index 8f57b9b..0d89dd6 100644 --- a/unpacker/unpacker_special +++ b/unpacker/unpacker_special @@ -137,3 +137,4 @@ CompressedTexSubImage1DARB CompressedTexSubImage2DARB CompressedTexSubImage3DARB DeleteFencesNV +DeleteQueriesARB
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor