mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-02 07:59:44 +08:00
Astrobot - Vulkan fix (#733)
* log and vulkan fix * Astrobot - Vulkan fix : OpControlBarrier
This commit is contained in:
@@ -712,6 +712,8 @@ public static partial class Gen5SpirvTranslator
|
||||
if (UsesSubgroupOperations())
|
||||
{
|
||||
_module.AddCapability(SpirvCapability.GroupNonUniform);
|
||||
_module.AddCapability(SpirvCapability.GroupNonUniformBallot);
|
||||
|
||||
if (UsesSubgroupShuffle())
|
||||
{
|
||||
_module.AddCapability(SpirvCapability.GroupNonUniformShuffle);
|
||||
@@ -722,10 +724,6 @@ public static partial class Gen5SpirvTranslator
|
||||
_module.AddCapability(SpirvCapability.GroupNonUniformVote);
|
||||
}
|
||||
|
||||
if (UsesSubgroupBroadcast() || UsesWaveControl())
|
||||
{
|
||||
_module.AddCapability(SpirvCapability.GroupNonUniformBallot);
|
||||
}
|
||||
}
|
||||
|
||||
_glsl = _module.ImportExtInst("GLSL.std.450");
|
||||
@@ -1803,13 +1801,16 @@ public static partial class Gen5SpirvTranslator
|
||||
|
||||
if (instruction.Opcode == "SBarrier")
|
||||
{
|
||||
var workgroup = UInt(2);
|
||||
var semantics = UInt(0x108);
|
||||
_module.AddStatement(
|
||||
SpirvOp.ControlBarrier,
|
||||
workgroup,
|
||||
workgroup,
|
||||
semantics);
|
||||
if (_stage == Gen5SpirvStage.Compute)
|
||||
{
|
||||
var workgroup = UInt(2);
|
||||
var semantics = UInt(0x108);
|
||||
_module.AddStatement(
|
||||
SpirvOp.ControlBarrier,
|
||||
workgroup,
|
||||
workgroup,
|
||||
semantics);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user