mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user