summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-01 02:16:46 +0100
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit31b10422760bf743268d8a90fda406eac4069540 (patch)
tree97e80d9d580da09389a7b7d8ddb3ce4272606db9 /src
parent5f4659260ec4bc49d951aa93da2945c1fbde9e2e (diff)
radeonsi/gfx9: set NUM_RECORDS correctly
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 71b511c958d..d9c0408be14 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1007,7 +1007,7 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx)
desc[1] = S_008F04_BASE_ADDRESS_HI(va >> 32) |
S_008F04_STRIDE(vb->stride);
- if (sctx->b.chip_class <= CIK && vb->stride) {
+ if (sctx->b.chip_class != VI && vb->stride) {
/* Round up by rounding down and adding 1 */
desc[2] = (vb->buffer->width0 - offset -
velems->format_size[i]) /
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 5ecbac8b276..575dd6c380f 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3079,7 +3079,7 @@ static LLVMValueRef get_buffer_size(
LLVMBuildExtractElement(builder, descriptor,
lp_build_const_int32(gallivm, 2), "");
- if (ctx->screen->b.chip_class >= VI) {
+ if (ctx->screen->b.chip_class == VI) {
/* On VI, the descriptor contains the size in bytes,
* but TXQ must return the size in elements.
* The stride is always non-zero for resources using TXQ.
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index affd7875d56..ae5aac0e465 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2764,7 +2764,7 @@ si_make_buffer_descriptor(struct si_screen *screen, struct r600_resource *buf,
num_records = size / stride;
num_records = MIN2(num_records, (buf->b.b.width0 - offset) / stride);
- if (screen->b.chip_class >= VI)
+ if (screen->b.chip_class == VI)
num_records *= stride;
state[4] = 0;