diff options
author | Chia-I Wu <[email protected]> | 2015-01-28 00:07:15 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-02-12 07:56:11 +0800 |
commit | d43ae05d76b1f14b713b70a84e87e443ab20979e (patch) | |
tree | 60e7e0a7bcc780223700a24d3e250ffe75668d3e /src/gallium/drivers/ilo | |
parent | f43332ca2ffbbaf009994c6e1fdac5c52e25b3b2 (diff) |
ilo: update 3DSTATE_PUSH_CONSTANT_ALLOC_x for Gen8
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_builder_3d_top.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h index 2e82640a9a8..7a21370aebf 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h @@ -90,10 +90,11 @@ gen7_3dstate_push_constant_alloc(struct ilo_builder *builder, GEN6_RENDER_SUBTYPE_3D | subop; const uint8_t cmd_len = 2; + const int slice_count = (ilo_dev_gen(builder->dev) >= ILO_GEN(8)) ? 2 : 1; uint32_t *dw; int end; - ILO_DEV_ASSERT(builder->dev, 7, 7.5); + ILO_DEV_ASSERT(builder->dev, 7, 8); /* VS, HS, DS, GS, and PS variants */ assert(subop >= GEN7_RENDER_OPCODE_3DSTATE_PUSH_CONSTANT_ALLOC_VS && @@ -113,16 +114,16 @@ gen7_3dstate_push_constant_alloc(struct ilo_builder *builder, * Thus, the valid range of buffer end is [0KB, 16KB]. */ end = (offset + size) / 1024; - if (end > 16) { + if (end > 16 * slice_count) { assert(!"invalid constant buffer end"); - end = 16; + end = 16 * slice_count; } /* the valid range of buffer offset is [0KB, 15KB] */ offset = (offset + 1023) / 1024; - if (offset > 15) { + if (offset > 15 * slice_count) { assert(!"invalid constant buffer offset"); - offset = 15; + offset = 15 * slice_count; } if (offset > end) { @@ -132,9 +133,9 @@ gen7_3dstate_push_constant_alloc(struct ilo_builder *builder, /* the valid range of buffer size is [0KB, 15KB] */ size = end - offset; - if (size > 15) { + if (size > 15 * slice_count) { assert(!"invalid constant buffer size"); - size = 15; + size = 15 * slice_count; } ilo_builder_batch_pointer(builder, cmd_len, &dw); |