summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-01-26 15:51:41 +0800
committerChia-I Wu <[email protected]>2015-02-12 07:56:11 +0800
commit3be0504399d7710d9cefcfcfe0b75cffc8cd7ad5 (patch)
treee491aa0ade82e71de6cb640878726e83ad09398c
parent49306afe7bc5333df710dc071419111ed4d4a6fb (diff)
ilo: update 3DSTATE_CONSTANT_x for Gen8
-rw-r--r--src/gallium/drivers/ilo/ilo_builder_3d_top.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h
index 9102504f2c1..ee16ca81e41 100644
--- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h
+++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h
@@ -1249,11 +1249,11 @@ gen7_3dstate_constant(struct ilo_builder *builder,
const uint32_t cmd = GEN6_RENDER_TYPE_RENDER |
GEN6_RENDER_SUBTYPE_3D |
subop;
- const uint8_t cmd_len = 7;
+ const uint8_t cmd_len = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 11 : 7;
uint32_t payload[6], *dw;
int total_read_length, i;
- ILO_DEV_ASSERT(builder->dev, 7, 7.5);
+ ILO_DEV_ASSERT(builder->dev, 7, 8);
/* VS, HS, DS, GS, and PS variants */
assert(subop >= GEN6_RENDER_OPCODE_3DSTATE_CONSTANT_VS &&
@@ -1308,7 +1308,20 @@ gen7_3dstate_constant(struct ilo_builder *builder,
ilo_builder_batch_pointer(builder, cmd_len, &dw);
dw[0] = cmd | (cmd_len - 2);
- memcpy(&dw[1], payload, sizeof(payload));
+ if (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) {
+ dw[1] = payload[0];
+ dw[2] = payload[1];
+ dw[3] = payload[2];
+ dw[4] = 0;
+ dw[5] = payload[3];
+ dw[6] = 0;
+ dw[7] = payload[4];
+ dw[8] = 0;
+ dw[9] = payload[5];
+ dw[10] = 0;
+ } else {
+ memcpy(&dw[1], payload, sizeof(payload));
+ }
}
static inline void