diff options
author | Dave Airlie <[email protected]> | 2018-02-02 17:28:15 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-02-05 05:15:41 +1000 |
commit | 7801425028a3261ba091603763b515959e73815f (patch) | |
tree | e11fc1a63c1b4e4f953812af20c57a8534df1cdf /src/gallium/drivers/r600 | |
parent | 6c1432f0be9c7772573bb86b997c9f085d16c204 (diff) |
r600: fix resq for buffer images.
If this is an image buffer, we need to calculate the correct resource
id.
Fixes:
KHR-GL45.shader_image_size.*
Reviewed-by: Roland Scheidegger <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 13aa681049c..b0931a3a851 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -8759,7 +8759,10 @@ static int tgsi_resq(struct r600_shader_ctx *ctx) (inst->Src[0].Register.File == TGSI_FILE_IMAGE && inst->Memory.Texture == TGSI_TEXTURE_BUFFER)) { if (ctx->bc->chip_class < EVERGREEN) ctx->shader->uses_tex_buffers = true; - return r600_do_buffer_txq(ctx, 0, ctx->shader->image_size_const_offset); + unsigned offset = 0; + if (inst->Src[0].Register.File == TGSI_FILE_IMAGE) + offset += R600_IMAGE_REAL_RESOURCE_OFFSET - R600_MAX_CONST_BUFFERS + ctx->shader->image_size_const_offset; + return r600_do_buffer_txq(ctx, 0, offset); } if (inst->Memory.Texture == TGSI_TEXTURE_CUBE_ARRAY && |