diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-11-26 10:11:52 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-11-26 10:11:52 -0800 |
commit | d6d82f1ab33b7885f11dd720e93d9890df27ce36 (patch) | |
tree | f2e4e7b0addbf5d7acfb0e9da1e0539aa33ecba0 /src/vulkan/anv_private.h | |
parent | cd4721c062a300739b107925f801c9b9ced5f9fa (diff) |
vk: Fix 3DSTATE_WM_DEPTH_STENCIL for gen8
This packet is a different size on gen8 and we hit an assertion when we
try to merge a gen9 size dword array from the pipeline with the gen8
sized array we create from dynamic state.
Use a static assert in the merge macro and fix this issue by using different
wm_depth_stencil arrays on gen8 and gen9.
Diffstat (limited to 'src/vulkan/anv_private.h')
-rw-r--r-- | src/vulkan/anv_private.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 36cee88602d..d208b2d74a0 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -677,7 +677,7 @@ __gen_combine_address(struct anv_batch *batch, void *location, do { \ uint32_t *dw; \ \ - assert(ARRAY_SIZE(dwords0) == ARRAY_SIZE(dwords1)); \ + static_assert(ARRAY_SIZE(dwords0) == ARRAY_SIZE(dwords1), "mismatch merge"); \ dw = anv_batch_emit_dwords((batch), ARRAY_SIZE(dwords0)); \ for (uint32_t i = 0; i < ARRAY_SIZE(dwords0); i++) \ dw[i] = (dwords0)[i] | (dwords1)[i]; \ @@ -1201,8 +1201,12 @@ struct anv_pipeline { struct { uint32_t sf[4]; uint32_t raster[5]; - uint32_t wm_depth_stencil[4]; + uint32_t wm_depth_stencil[3]; } gen8; + + struct { + uint32_t wm_depth_stencil[4]; + } gen9; }; struct anv_graphics_pipeline_create_info { |