summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_pipeline_util.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-02-22 15:46:23 -0800
committerKenneth Graunke <kenneth@whitecape.org>2016-02-24 11:13:08 -0800
commit7f9b03cc8b44759895d5c4c42cfef8fa78269e7c (patch)
treecb52eaf064c2ea0ac64e4f91f5aa8917b68412f0 /src/intel/vulkan/genX_pipeline_util.h
parent1024a66fc4ff34a03ecfdf3ec053cb874fb206fe (diff)
downloadexternal_mesa3d-7f9b03cc8b44759895d5c4c42cfef8fa78269e7c.zip
external_mesa3d-7f9b03cc8b44759895d5c4c42cfef8fa78269e7c.tar.gz
external_mesa3d-7f9b03cc8b44759895d5c4c42cfef8fa78269e7c.tar.bz2
anv: Emit 3DSTATE_PUSH_CONSTANT_ALLOC_* via a loop.
Now we're emitting HS and DS packets as well.
Diffstat (limited to 'src/intel/vulkan/genX_pipeline_util.h')
-rw-r--r--src/intel/vulkan/genX_pipeline_util.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/intel/vulkan/genX_pipeline_util.h b/src/intel/vulkan/genX_pipeline_util.h
index dea96a9..cf4e035 100644
--- a/src/intel/vulkan/genX_pipeline_util.h
+++ b/src/intel/vulkan/genX_pipeline_util.h
@@ -200,15 +200,14 @@ emit_urb_setup(struct anv_pipeline *pipeline)
.Address = { &device->workaround_bo, 0 });
#endif
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_VS),
- .ConstantBufferOffset = 0,
- .ConstantBufferSize = 4);
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_GS),
- .ConstantBufferOffset = 4,
- .ConstantBufferSize = 4);
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_PS),
- .ConstantBufferOffset = 8,
- .ConstantBufferSize = 4);
+ unsigned push_start = 0;
+ for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_FRAGMENT; i++) {
+ anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PUSH_CONSTANT_ALLOC_VS),
+ ._3DCommandSubOpcode = 18 + i,
+ .ConstantBufferOffset = push_start,
+ .ConstantBufferSize = pipeline->urb.push_size[i]);
+ push_start += pipeline->urb.push_size[i];
+ }
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_URB_VS),