From: Chia-I Wu Date: Mon, 26 Jan 2015 07:51:41 +0000 (+0800) Subject: ilo: update 3DSTATE_CONSTANT_x for Gen8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3be0504399d7710d9cefcfcfe0b75cffc8cd7ad5;p=mesa.git ilo: update 3DSTATE_CONSTANT_x for Gen8 --- 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