summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-26 22:10:11 -0800
committerJason Ekstrand <[email protected]>2016-01-26 22:10:14 -0800
commitd3607351fecd80c5e875204af394e4aaee06754f (patch)
treec5852f4969ba594848ed01ef528aa2149bf260c6
parentf2f03c5b65a07b24df284ae46b975cdf8f3d3f06 (diff)
gen7/cmd_buffer: SCISSOR_RECT structs are tightly packed
The pointer has to be 32-byte aligned, but the structs themselves are 2 dwords each, tightly packed.
-rw-r--r--src/vulkan/gen7_cmd_buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c
index 9f66364c6c1..f201c151acb 100644
--- a/src/vulkan/gen7_cmd_buffer.c
+++ b/src/vulkan/gen7_cmd_buffer.c
@@ -170,7 +170,7 @@ emit_scissor_state(struct anv_cmd_buffer *cmd_buffer,
uint32_t count, const VkRect2D *scissors)
{
struct anv_state scissor_state =
- anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, count * 32, 32);
+ anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, count * 8, 32);
for (uint32_t i = 0; i < count; i++) {
const VkRect2D *s = &scissors[i];
@@ -197,10 +197,10 @@ emit_scissor_state(struct anv_cmd_buffer *cmd_buffer,
};
if (s->extent.width <= 0 || s->extent.height <= 0) {
- GEN7_SCISSOR_RECT_pack(NULL, scissor_state.map + i * 32,
+ GEN7_SCISSOR_RECT_pack(NULL, scissor_state.map + i * 8,
&empty_scissor);
} else {
- GEN7_SCISSOR_RECT_pack(NULL, scissor_state.map + i * 32, &scissor);
+ GEN7_SCISSOR_RECT_pack(NULL, scissor_state.map + i * 8, &scissor);
}
}