Browse Source

mesa/main: add USAGE_TRANSFORM_FEEDBACK_BUFFER flag to buffer UsageHistory

We will want to disable minmax index caching for buffers that are used in this
way.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tags/11.2-branchpoint
Nicolai Hähnle 9 years ago
parent
commit
54c4a9803b
2 changed files with 4 additions and 0 deletions
  1. 1
    0
      src/mesa/main/mtypes.h
  2. 3
    0
      src/mesa/main/transformfeedback.h

+ 1
- 0
src/mesa/main/mtypes.h View File

@@ -1253,6 +1253,7 @@ typedef enum {
USAGE_TEXTURE_BUFFER = 0x2,
USAGE_ATOMIC_COUNTER_BUFFER = 0x4,
USAGE_SHADER_STORAGE_BUFFER = 0x8,
USAGE_TRANSFORM_FEEDBACK_BUFFER = 0x10,
} gl_buffer_usage;



+ 3
- 0
src/mesa/main/transformfeedback.h View File

@@ -145,6 +145,9 @@ _mesa_set_transform_feedback_binding(struct gl_context *ctx,
tfObj->BufferNames[index] = bufObj->Name;
tfObj->Offset[index] = offset;
tfObj->RequestedSize[index] = size;

if (bufObj != ctx->Shared->NullBufferObj)
bufObj->UsageHistory |= USAGE_TRANSFORM_FEEDBACK_BUFFER;
}

/*** GL_ARB_direct_state_access ***/

Loading…
Cancel
Save