mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
radeon/llvm: Handle LP_CHAN_ALL in emit_fetch_immediate().
Fixes piglit spec/ARB_sampler_objects/sampler-incomplete and spec/EXT_texture_swizzle/depth_texture_mode_and_swizzle. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
121d19de92
commit
a56dfd99e2
1 changed files with 11 additions and 1 deletions
|
|
@ -125,7 +125,17 @@ emit_fetch_immediate(
|
|||
}
|
||||
|
||||
struct lp_build_tgsi_soa_context *bld = lp_soa_context(bld_base);
|
||||
return LLVMConstBitCast(bld->immediates[reg->Register.Index][swizzle], ctype);
|
||||
if (swizzle == ~0) {
|
||||
LLVMValueRef values[TGSI_NUM_CHANNELS] = {};
|
||||
unsigned chan;
|
||||
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
|
||||
values[chan] = LLVMConstBitCast(bld->immediates[reg->Register.Index][chan], ctype);
|
||||
}
|
||||
return lp_build_gather_values(bld_base->base.gallivm, values,
|
||||
TGSI_NUM_CHANNELS);
|
||||
} else {
|
||||
return LLVMConstBitCast(bld->immediates[reg->Register.Index][swizzle], ctype);
|
||||
}
|
||||
}
|
||||
|
||||
static LLVMValueRef
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue