Merge pull request #574 from CnRJay/fix/shader-memory-select

fix(shader): splat the bindless table hit into a bool vector for SPIR-V 1.3
This commit is contained in:
Dean
2026-10-05 12:59:53 +13:00
committed by GitHub
@@ -245,7 +245,9 @@ std::uint32_t SampledComponentZero(SpirvEmitterState& state, IrTextureNumericCla
std::uint32_t TableResult(SpirvValueEmitContext& ctx, const ImageEmitAccess& access, std::uint32_t result) {
if (access.table.mapped == 0) return result;
auto& state = ctx.state;
return Select(state, TypeU32Vector(state, 4), access.table.mapped, result, ConstantU32CompositeZero(state, 4));
const auto mapped = state.module.AllocateId();
state.module.AddFunction(spv::OpCompositeConstruct, TypeBoolVector(state, 4), mapped, access.table.mapped, access.table.mapped, access.table.mapped, access.table.mapped);
return Select(state, TypeU32Vector(state, 4), mapped, result, ConstantU32CompositeZero(state, 4));
}
std::uint32_t ResultVector(SpirvValueEmitContext& ctx, const ImageEmitAccess& access, std::uint32_t value, IrTextureNumericClass numericClass, bool dref, bool gather) {