summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-30 10:37:50 -0800
committerJason Ekstrand <[email protected]>2015-12-30 10:37:57 -0800
commit28243b2fbadeb4055e1ef83c14d94d62f01fe413 (patch)
tree46d1a30f88f97ed18c8557f754bdd3a0afe47f76 /src/vulkan
parenta0b2829f200288a85899884019c2aea530a95c46 (diff)
gen7/8/cmd_buffer: Allocate the correct ammount for COLOR_CALC_STATE
We were allocating 6 bytes when we should have been allocating 6 dwords.
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/gen7_cmd_buffer.c3
-rw-r--r--src/vulkan/gen8_cmd_buffer.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c
index 7fdef1027e2..feed3611805 100644
--- a/src/vulkan/gen7_cmd_buffer.c
+++ b/src/vulkan/gen7_cmd_buffer.c
@@ -428,7 +428,8 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
ANV_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE)) {
struct anv_state cc_state =
anv_cmd_buffer_alloc_dynamic_state(cmd_buffer,
- GEN7_COLOR_CALC_STATE_length, 64);
+ GEN7_COLOR_CALC_STATE_length * 4,
+ 64);
struct GEN7_COLOR_CALC_STATE cc = {
.BlendConstantColorRed = cmd_buffer->state.dynamic.blend_constants[0],
.BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1],
diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c
index d571f9c97e3..9614da705e7 100644
--- a/src/vulkan/gen8_cmd_buffer.c
+++ b/src/vulkan/gen8_cmd_buffer.c
@@ -265,7 +265,8 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
ANV_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE)) {
struct anv_state cc_state =
anv_cmd_buffer_alloc_dynamic_state(cmd_buffer,
- GEN8_COLOR_CALC_STATE_length, 64);
+ GEN8_COLOR_CALC_STATE_length * 4,
+ 64);
struct GEN8_COLOR_CALC_STATE cc = {
.BlendConstantColorRed = cmd_buffer->state.dynamic.blend_constants[0],
.BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1],
@@ -319,7 +320,8 @@ cmd_buffer_flush_state(struct anv_cmd_buffer *cmd_buffer)
if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_DYNAMIC_BLEND_CONSTANTS) {
struct anv_state cc_state =
anv_cmd_buffer_alloc_dynamic_state(cmd_buffer,
- GEN9_COLOR_CALC_STATE_length, 64);
+ GEN9_COLOR_CALC_STATE_length * 4,
+ 64);
struct GEN9_COLOR_CALC_STATE cc = {
.BlendConstantColorRed = cmd_buffer->state.dynamic.blend_constants[0],
.BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1],