[Mesa-dev] [PATCH v2 15/82] mesa: Initialize and free shader storage buffers

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Jun 16 22:08:30 PDT 2015



On 17/06/15 00:20, Jordan Justen wrote:
> On 2015-06-03 00:01:05, Iago Toral Quiroga wrote:
>> ---
>>  src/mesa/main/bufferobj.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
>> index c5d4ada..a528787 100644
>> --- a/src/mesa/main/bufferobj.c
>> +++ b/src/mesa/main/bufferobj.c
>> @@ -836,6 +836,9 @@ _mesa_init_buffer_objects( struct gl_context *ctx )
>>     _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer,
>>                                  ctx->Shared->NullBufferObj);
>>  
>> +   _mesa_reference_buffer_object(ctx, &ctx->ShaderStorageBuffer,
>> +                                ctx->Shared->NullBufferObj);
> 
> Tabs here?
> 

I'm going to check the indention here.

> With that fixed, this and
> 14/82 glsl: fix error messages in invalid declarations of shader storage blocks
> 
> Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
> 

Thanks!

Sam

>>     _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer,
>>                                  ctx->Shared->NullBufferObj);
>>  
>> @@ -850,6 +853,14 @@ _mesa_init_buffer_objects( struct gl_context *ctx )
>>        ctx->UniformBufferBindings[i].Size = -1;
>>     }
>>  
>> +   for (i = 0; i < MAX_COMBINED_SHADER_STORAGE_BUFFERS; i++) {
>> +      _mesa_reference_buffer_object(ctx,
>> +                                    &ctx->ShaderStorageBufferBindings[i].BufferObject,
>> +                                    ctx->Shared->NullBufferObj);
>> +      ctx->ShaderStorageBufferBindings[i].Offset = -1;
>> +      ctx->ShaderStorageBufferBindings[i].Size = -1;
>> +   }
>> +
>>     for (i = 0; i < MAX_COMBINED_ATOMIC_BUFFERS; i++) {
>>        _mesa_reference_buffer_object(ctx,
>>                                     &ctx->AtomicBufferBindings[i].BufferObject,
>> @@ -872,6 +883,8 @@ _mesa_free_buffer_objects( struct gl_context *ctx )
>>  
>>     _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, NULL);
>>  
>> +   _mesa_reference_buffer_object(ctx, &ctx->ShaderStorageBuffer, NULL);
>> +
>>     _mesa_reference_buffer_object(ctx, &ctx->AtomicBuffer, NULL);
>>  
>>     _mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer, NULL);
>> @@ -882,6 +895,12 @@ _mesa_free_buffer_objects( struct gl_context *ctx )
>>                                     NULL);
>>     }
>>  
>> +   for (i = 0; i < MAX_COMBINED_SHADER_STORAGE_BUFFERS; i++) {
>> +      _mesa_reference_buffer_object(ctx,
>> +                                    &ctx->ShaderStorageBufferBindings[i].BufferObject,
>> +                                    NULL);
>> +   }
>> +
>>     for (i = 0; i < MAX_COMBINED_ATOMIC_BUFFERS; i++) {
>>        _mesa_reference_buffer_object(ctx,
>>                                     &ctx->AtomicBufferBindings[i].BufferObject,
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> 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