mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radeonsi: fix GLSL imageSamples()
We haven't supported MSAA images, so it doesn't matter much. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
parent
279da8a201
commit
0a0def7317
1 changed files with 13 additions and 0 deletions
|
|
@ -1015,6 +1015,19 @@ static void resq_emit(
|
|||
|
||||
emit_data->output[emit_data->chan] =
|
||||
fix_resinfo(ctx, target, ac_build_image_opcode(&ctx->ac, &args));
|
||||
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_RESQ &&
|
||||
(target == TGSI_TEXTURE_2D_MSAA ||
|
||||
target == TGSI_TEXTURE_2D_ARRAY_MSAA)) {
|
||||
LLVMValueRef samples =
|
||||
ac_build_image_get_sample_count(&ctx->ac, args.resource);
|
||||
|
||||
emit_data->output[emit_data->chan] =
|
||||
LLVMBuildInsertElement(ctx->ac.builder,
|
||||
emit_data->output[emit_data->chan],
|
||||
samples,
|
||||
LLVMConstInt(ctx->i32, 3, 0), "");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue