mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-14 23:46:58 +02:00
WildCard's Fix Attempt
This commit is contained in:
parent
547ca5e3ba
commit
ea6b11dfbc
1 changed files with 1 additions and 9 deletions
|
|
@ -140,16 +140,8 @@ Id GetCbuf(EmitContext& ctx, Id result_type, Id UniformDefinitions::*member_ptr,
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto is_float = UniformDefinitions::IsFloat(member_ptr);
|
|
||||||
const auto num_elements = UniformDefinitions::NumElements(member_ptr);
|
|
||||||
const std::array zero_vec{
|
|
||||||
is_float ? ctx.Const(0.0f) : ctx.Const(0u),
|
|
||||||
is_float ? ctx.Const(0.0f) : ctx.Const(0u),
|
|
||||||
is_float ? ctx.Const(0.0f) : ctx.Const(0u),
|
|
||||||
is_float ? ctx.Const(0.0f) : ctx.Const(0u),
|
|
||||||
};
|
|
||||||
const Id cond = ctx.OpULessThanEqual(ctx.TypeBool(), buffer_offset, ctx.Const(0xFFFFu));
|
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 = ctx.ConstantNull(result_type);
|
||||||
return ctx.OpSelect(result_type, cond, val, zero);
|
return ctx.OpSelect(result_type, cond, val, zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue