aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-09-10 15:41:40 -0700
committerIan Romanick <[email protected]>2014-09-12 16:35:35 -0700
commit6b6145204dd4a1112f6e1fe10162636141495b79 (patch)
tree30809a5f9ef2d22f67b7a3677e75c2025b81ee4f /src/mesa/drivers/dri/i965/brw_context.h
parente980fe607155c79ccba56ef78854093b7730bef6 (diff)
i965: Separate gl_InstanceID and gl_VertexID uploading.
We always uploaded them together, mostly out of laziness - both required an additional vertex element. However, gl_VertexID now also requires an additional vertex buffer for storing gl_BaseVertex; for non-indirect draws this also means uploading (a small amount of) data. This is extra overhead we don't need if the shader only uses gl_InstanceID. In particular, our clear shaders currently use gl_InstanceID for doing layered clears, but don't need gl_VertexID. Signed-off-by: Kenneth Graunke <[email protected]> Cc: "10.3" <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 39cb8566b63..5830aa993d5 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -553,6 +553,7 @@ struct brw_vs_prog_data {
GLbitfield64 inputs_read;
bool uses_vertexid;
+ bool uses_instanceid;
};