From fe9699dcb491d07f5b629828fd0d3dad5a213318 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 15 May 2017 16:15:13 -0700 Subject: genxml: Make 3DSTATE_CONSTANT_BODY on Gen7+ use arrays. This will let us initialize the constant buffers with loops. Reviewed-by: Lionel Landwerlin --- src/intel/genxml/gen7.xml | 14 ++++++-------- src/intel/genxml/gen75.xml | 14 ++++++-------- src/intel/genxml/gen8.xml | 14 ++++++-------- src/intel/genxml/gen9.xml | 14 ++++++-------- src/intel/vulkan/genX_cmd_buffer.c | 8 ++++---- src/mesa/drivers/dri/i965/genX_state_upload.c | 10 ++++------ 6 files changed, 32 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/intel/genxml/gen7.xml b/src/intel/genxml/gen7.xml index c98327a1915..2c297f3b95b 100644 --- a/src/intel/genxml/gen7.xml +++ b/src/intel/genxml/gen7.xml @@ -378,15 +378,13 @@ - - - - - + + + - - - + + + diff --git a/src/intel/genxml/gen75.xml b/src/intel/genxml/gen75.xml index 11f1462cd1f..e7c06dc5819 100644 --- a/src/intel/genxml/gen75.xml +++ b/src/intel/genxml/gen75.xml @@ -377,15 +377,13 @@ - - - - - + + + - - - + + + diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml index 541a788c82c..2fd796a2e24 100644 --- a/src/intel/genxml/gen8.xml +++ b/src/intel/genxml/gen8.xml @@ -403,14 +403,12 @@ - - - - - - - - + + + + + + diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml index 3e9e88e219a..af40e660771 100644 --- a/src/intel/genxml/gen9.xml +++ b/src/intel/genxml/gen9.xml @@ -424,14 +424,12 @@ - - - - - - - - + + + + + + diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 0bb6d8e782c..072d0d50325 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -1482,11 +1482,11 @@ cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer) c._3DCommandSubOpcode = push_constant_opcodes[stage], c.ConstantBody = (struct GENX(3DSTATE_CONSTANT_BODY)) { #if GEN_GEN >= 9 - .PointerToConstantBuffer2 = { &cmd_buffer->device->dynamic_state_pool.block_pool.bo, state.offset }, - .ConstantBuffer2ReadLength = DIV_ROUND_UP(state.alloc_size, 32), + .Buffer[2] = { &cmd_buffer->device->dynamic_state_pool.block_pool.bo, state.offset }, + .ReadLength[2] = DIV_ROUND_UP(state.alloc_size, 32), #else - .PointerToConstantBuffer0 = { .offset = state.offset }, - .ConstantBuffer0ReadLength = DIV_ROUND_UP(state.alloc_size, 32), + .Buffer[0] = { .offset = state.offset }, + .ReadLength[0] = DIV_ROUND_UP(state.alloc_size, 32), #endif }; } diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 1f05eea4426..cc6542163eb 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -2674,14 +2674,12 @@ upload_constant_state(struct brw_context *brw, pkt._3DCommandSubOpcode = push_constant_opcodes[stage]; if (active) { #if GEN_GEN >= 8 || GEN_IS_HASWELL - pkt.ConstantBody.ConstantBuffer2ReadLength = - stage_state->push_const_size; - pkt.ConstantBody.PointerToConstantBuffer2 = + pkt.ConstantBody.ReadLength[2] = stage_state->push_const_size; + pkt.ConstantBody.Buffer[2] = render_ro_bo(brw->curbe.curbe_bo, stage_state->push_const_offset); #else - pkt.ConstantBody.ConstantBuffer0ReadLength = - stage_state->push_const_size; - pkt.ConstantBody.PointerToConstantBuffer0.offset = + pkt.ConstantBody.ReadLength[0] = stage_state->push_const_size; + pkt.ConstantBody.Buffer[0].offset = stage_state->push_const_offset | mocs; #endif } -- cgit v1.2.3