summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-18 12:25:11 -0800
committerJason Ekstrand <[email protected]>2015-11-18 12:26:57 -0800
commit6f613abc2bf8fc3cf70c51a1d569bc4eb9dd18af (patch)
tree385449eaca9ed3158c582bd96b47a2ec5246197f /src/vulkan/anv_cmd_buffer.c
parentfb8b2f5f9e029fdaaf78cac4b7f72084c4ae4ea2 (diff)
anv/cmd_buffer: Add a new genX_cmd_buffer file for shared code
This file contains code that can be shared across gens modulo recompiling. In particular, we can share STATE_BASE_ADDRESS setup and handling of the vkPipelineBarrier call. Not sharing STATE_BASE_ADDRESS setup has already been a source of bugs and the gen7 and gen8 implementations of PipelineBarrier were line-for-line identical. Incidentally, this should fix MOCS settings for dynamic and surface state on Haswell.
Diffstat (limited to 'src/vulkan/anv_cmd_buffer.c')
-rw-r--r--src/vulkan/anv_cmd_buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c
index 1a37d8124d9..6dedc3f335f 100644
--- a/src/vulkan/anv_cmd_buffer.c
+++ b/src/vulkan/anv_cmd_buffer.c
@@ -244,7 +244,10 @@ anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
{
switch (cmd_buffer->device->info.gen) {
case 7:
- return gen7_cmd_buffer_emit_state_base_address(cmd_buffer);
+ if (cmd_buffer->device->info.is_haswell)
+ return gen7_cmd_buffer_emit_state_base_address(cmd_buffer);
+ else
+ return gen7_cmd_buffer_emit_state_base_address(cmd_buffer);
case 8:
return gen8_cmd_buffer_emit_state_base_address(cmd_buffer);
default: