[Mesa-dev] [PATCH 03/10] mesa: Add gl_shared_state::ShareGroupReset and gl_context::ShareGroupReset
Ian Romanick
idr at freedesktop.org
Wed Oct 30 16:23:01 CET 2013
On 10/30/2013 07:15 AM, Brian Paul wrote:
> On 10/29/2013 07:07 PM, Ian Romanick wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> These will be used to determine whether to signal a GPU reset after
>> another context in the share group has observed a reset.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> ---
>> src/mesa/main/context.c | 1 +
>> src/mesa/main/mtypes.h | 18 ++++++++++++++++++
>> 2 files changed, 19 insertions(+)
>>
>> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
>> index f9ca709..c6b0104 100644
>> --- a/src/mesa/main/context.c
>> +++ b/src/mesa/main/context.c
>> @@ -804,6 +804,7 @@ init_attrib_groups(struct gl_context *ctx)
>> ctx->NewState = _NEW_ALL;
>> ctx->NewDriverState = ~0;
>> ctx->ErrorValue = GL_NO_ERROR;
>> + ctx->ShareGroupReset = false;
>> ctx->varying_vp_inputs = VERT_BIT_ALL;
>>
>> return GL_TRUE;
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index 55a05f2..c06e8b1 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -2755,6 +2755,17 @@ struct gl_shared_state
>>
>> /** GL_ARB_sampler_objects */
>> struct _mesa_HashTable *SamplerObjects;
>> +
>> + /**
>> + * Some context in this share group was affected by a GPU reset
>> + *
>> + * On the next call to \c glGetGraphicsResetStatus, contexts that
>> have not
>> + * been affected by a GPU reset must also return
>> + * \c GL_INNOCENT_CONTEXT_RESET_ARB.
>> + *
>> + * Once this field becomes true, it is never reset to false.
>> + */
>> + GLboolean ShareGroupReset;
>> };
>>
>>
>> @@ -3898,6 +3909,13 @@ struct gl_context
>> const void *vdpGetProcAddress;
>> struct set *vdpSurfaces;
>> /*@}*/
>> +
>> + /**
>> + * Has this context observed a GPU reset in any context in the
>> share group?
>> + *
>> + * Once this field becomes true, it is never reset to false.
>> + */
>> + GLboolean ShareGroupReset;
>> };
>
> Let's try to be consistent about GLboolean/GL_TRUE/GL_FALSE vs.
> bool/true/false. MSVC sometimes complains about using true/false with
> GLboolean and vice versa. It looks like these struct members should be
> changed to bool.
I think I originally had this as bool, but there was some problem with
the XML stuff down in DRI land. I think Eric fixed that with commit
ea6cf2b. I'll go ahead and change it back to bool.
> For 1-4, Reviewed-by: Brian Paul <brianp at vmware.com>
>
> -Brian
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list