diff options
author | Jason Ekstrand <[email protected]> | 2015-11-18 12:25:11 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-18 12:26:57 -0800 |
commit | 6f613abc2bf8fc3cf70c51a1d569bc4eb9dd18af (patch) | |
tree | 385449eaca9ed3158c582bd96b47a2ec5246197f /src/vulkan/anv_cmd_buffer.c | |
parent | fb8b2f5f9e029fdaaf78cac4b7f72084c4ae4ea2 (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.c | 5 |
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: |