mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
fix(shader): broadcast the first pixel LDS slot without a dynamic lane
This commit is contained in:
1 parent
d06caa7a8d
commit
89fcff6dd8
2 files changed
+3
-7
No files matched your search
@@ -5453,8 +5453,8 @@ void verifyMergedHullConfiguration() {
|
||||
require(!serializer.Deserialize(separate).request.graphics->tessellation->mergedHull, "a separate hull configuration was read as merged");
|
||||
constexpr std::size_t pointTailBytes = 13u;
|
||||
auto legacy = decodeBase64(merged);
|
||||
require(legacy.size() > 54u + pointTailBytes && legacy[4] == 44u, "a merged hull request did not use serialization version 44");
|
||||
legacy.resize(legacy.size() - 1u - pointTailBytes);
|
||||
require(legacy.size() > 54u + pointTailBytes && legacy[4] == 45u, "a merged hull request did not use serialization version 45");
|
||||
legacy.resize(legacy.size() - 2u - pointTailBytes);
|
||||
legacy.pop_back();
|
||||
require(legacy[legacy.size() - 52u] == 1u, "the merged hull flag is not the last byte of the tessellation configuration");
|
||||
legacy.erase(legacy.end() - 52);
|
||||
|
||||
@@ -99,14 +99,10 @@ void EmitPixelFunctionLdsBase(SpirvEmitterState& state) {
|
||||
state.module.AddFunction(spv::OpSelect, TypeU32(state), claimed, exhausted, ConstantU32(state, 0u), acquired);
|
||||
state.module.AddFunction(spv::OpStore, slotVar, claimed);
|
||||
});
|
||||
const auto ballot = state.module.AllocateId();
|
||||
state.module.AddFunction(spv::OpGroupNonUniformBallot, TypeU32Vector(state, 4u), ballot, ConstantU32(state, spv::ScopeSubgroup), elected);
|
||||
const auto source = state.module.AllocateId();
|
||||
state.module.AddFunction(spv::OpGroupNonUniformBallotFindLSB, TypeU32(state), source, ConstantU32(state, spv::ScopeSubgroup), ballot);
|
||||
const auto local = state.module.AllocateId();
|
||||
state.module.AddFunction(spv::OpLoad, TypeU32(state), local, slotVar);
|
||||
const auto slot = state.module.AllocateId();
|
||||
state.module.AddFunction(spv::OpGroupNonUniformBroadcast, TypeU32(state), slot, ConstantU32(state, spv::ScopeSubgroup), local, source);
|
||||
state.module.AddFunction(spv::OpGroupNonUniformBroadcastFirst, TypeU32(state), slot, ConstantU32(state, spv::ScopeSubgroup), local);
|
||||
std::uint32_t lane;
|
||||
if (state.splitSubgroup) {
|
||||
if (state.subgroupLocalInvocationIdVariable == 0) FailEmit("pixel function LDS lane was not declared");
|
||||
|
||||
Reference in new issue
Block a user