summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-10 18:56:15 -0800
committerJason Ekstrand <[email protected]>2015-12-10 18:56:27 -0800
commit21cf55ab54de1c7e42ffffd92dc123759734e370 (patch)
tree9b8bd1eeaf275842a79bec37c227904da2de74d4 /src/vulkan
parent3893e11f4bb0b6a0088a778a0fbfd9d0e3558c80 (diff)
gen8/cmd_buffer: Don't push CS constants if there aren't any
Issuing MEDIA_CURB_LOAD with a size of zero causes GPU hangs on BDW.
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/gen8_cmd_buffer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c
index 8d17066ee6f..5e566d3aaa1 100644
--- a/src/vulkan/gen8_cmd_buffer.c
+++ b/src/vulkan/gen8_cmd_buffer.c
@@ -525,9 +525,11 @@ flush_compute_descriptor_set(struct anv_cmd_buffer *cmd_buffer)
unsigned reg_aligned_constant_size = ALIGN(push_constant_data_size, 32);
unsigned push_constant_regs = reg_aligned_constant_size / 32;
- anv_batch_emit(&cmd_buffer->batch, GENX(MEDIA_CURBE_LOAD),
- .CURBETotalDataLength = push_state.alloc_size,
- .CURBEDataStartAddress = push_state.offset);
+ if (push_state.alloc_size) {
+ anv_batch_emit(&cmd_buffer->batch, GENX(MEDIA_CURBE_LOAD),
+ .CURBETotalDataLength = push_state.alloc_size,
+ .CURBEDataStartAddress = push_state.offset);
+ }
struct anv_state state =
anv_state_pool_emit(&device->dynamic_state_pool,