|
|
@ -7,7 +7,12 @@ |
|
|
namespace Shader::Backend::SPIRV { |
|
|
namespace Shader::Backend::SPIRV { |
|
|
namespace { |
|
|
namespace { |
|
|
Id SubgroupScope(EmitContext& ctx) { |
|
|
Id SubgroupScope(EmitContext& ctx) { |
|
|
|
|
|
#ifdef __APPLE__
|
|
|
|
|
|
// MoltenVK doesn't support Subgroup scope for compute shaders
|
|
|
|
|
|
return ctx.Const(static_cast<u32>(spv::Scope::Workgroup)); |
|
|
|
|
|
#else
|
|
|
return ctx.Const(static_cast<u32>(spv::Scope::Subgroup)); |
|
|
return ctx.Const(static_cast<u32>(spv::Scope::Subgroup)); |
|
|
|
|
|
#endif
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Id GetThreadId(EmitContext& ctx) { |
|
|
Id GetThreadId(EmitContext& ctx) { |
|
|
|