mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radeonsi: set the sample index for shader images correctly
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
0a0def7317
commit
1881b35bf6
1 changed files with 7 additions and 6 deletions
|
|
@ -276,18 +276,19 @@ static void image_fetch_coords(
|
|||
LLVMValueRef tmp;
|
||||
int chan;
|
||||
|
||||
if (target == TGSI_TEXTURE_2D_MSAA ||
|
||||
target == TGSI_TEXTURE_2D_ARRAY_MSAA) {
|
||||
/* Need the sample index as well. */
|
||||
num_coords++;
|
||||
}
|
||||
|
||||
for (chan = 0; chan < num_coords; ++chan) {
|
||||
tmp = lp_build_emit_fetch(bld_base, inst, src, chan);
|
||||
tmp = ac_to_integer(&ctx->ac, tmp);
|
||||
coords[chan] = tmp;
|
||||
}
|
||||
|
||||
if (target == TGSI_TEXTURE_2D_MSAA ||
|
||||
target == TGSI_TEXTURE_2D_ARRAY_MSAA) {
|
||||
/* Need the sample index as well. */
|
||||
tmp = lp_build_emit_fetch(bld_base, inst, src, TGSI_SWIZZLE_W);
|
||||
coords[chan] = ac_to_integer(&ctx->ac, tmp);
|
||||
}
|
||||
|
||||
if (ctx->screen->info.chip_class == GFX9) {
|
||||
/* 1D textures are allocated and used as 2D on GFX9. */
|
||||
if (target == TGSI_TEXTURE_1D) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue