i965: Implement DriverFlags.NewShaderStorageBuffer
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 19 Mar 2015 10:07:19 +0000 (11:07 +0100)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 Sep 2015 06:39:20 +0000 (08:39 +0200)
We use the same dirty state for SSBOs and UBOs because they share the
same infrastructure.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/intel_buffer_objects.c

index 14627d5231bda3cf036c3aa289cf692a37276dcb..bf06ed38bd7f3a68574ccf8d2dd52cd2149b68b7 100644 (file)
@@ -484,6 +484,7 @@ void brw_init_state( struct brw_context *brw )
    ctx->DriverFlags.NewTransformFeedbackProg = BRW_NEW_TRANSFORM_FEEDBACK;
    ctx->DriverFlags.NewRasterizerDiscard = BRW_NEW_RASTERIZER_DISCARD;
    ctx->DriverFlags.NewUniformBuffer = BRW_NEW_UNIFORM_BUFFER;
+   ctx->DriverFlags.NewShaderStorageBuffer = BRW_NEW_UNIFORM_BUFFER;
    ctx->DriverFlags.NewTextureBuffer = BRW_NEW_TEXTURE_BUFFER;
    ctx->DriverFlags.NewAtomicBuffer = BRW_NEW_ATOMIC_BUFFER;
    ctx->DriverFlags.NewImageUnits = BRW_NEW_IMAGE_UNITS;
index a51095f2d65b15a5efe5b855c2855a32d5567a1b..7a5b3fca595e3f3db46eb97553d75d37fc015d5f 100644 (file)
@@ -106,6 +106,8 @@ alloc_buffer_object(struct brw_context *brw,
     */
    if (intel_obj->Base.UsageHistory & USAGE_UNIFORM_BUFFER)
       brw->ctx.NewDriverState |= BRW_NEW_UNIFORM_BUFFER;
+   if (intel_obj->Base.UsageHistory & USAGE_SHADER_STORAGE_BUFFER)
+      brw->ctx.NewDriverState |= BRW_NEW_UNIFORM_BUFFER;
    if (intel_obj->Base.UsageHistory & USAGE_TEXTURE_BUFFER)
       brw->ctx.NewDriverState |= BRW_NEW_TEXTURE_BUFFER;
    if (intel_obj->Base.UsageHistory & USAGE_ATOMIC_COUNTER_BUFFER)