mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[shader_recompiler] fix CBuf get/set VUUID due to using composite for U32[1], F32[1]
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
c984c387d7
commit
3299e61653
1 changed files with 3 additions and 1 deletions
|
|
@ -149,7 +149,9 @@ Id GetCbuf(EmitContext& ctx, Id result_type, Id UniformDefinitions::*member_ptr,
|
|||
is_float ? ctx.Const(0.0f) : ctx.Const(0u),
|
||||
};
|
||||
const Id cond = ctx.OpULessThanEqual(ctx.TypeBool(), buffer_offset, ctx.Const(0xFFFFu));
|
||||
const Id zero = ctx.OpCompositeConstruct(result_type, std::span(zero_vec.data(), num_elements));
|
||||
const Id zero = num_elements > 1
|
||||
? ctx.OpCompositeConstruct(result_type, std::span(zero_vec.data(), num_elements))
|
||||
: (is_float ? ctx.Const(0.0f) : ctx.Const(0u));
|
||||
return ctx.OpSelect(result_type, cond, val, zero);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue