mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
fix(agc): journal a vertex point list and its point sizes
Pipeline creation and SPIR-V validation read State::vertexPoints and the three point sizes, so the pipeline journal's recipe codec and canonical state now carry them, the State layout guard names its new size and the journal format becomes 6 (main took 5 for the recipe codec change of #5656). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
11bc7b1686
commit
891bb20161
2 files changed
+21
-1
No files matched your search
@@ -35,7 +35,7 @@ static_assert(sizeof(VkStencilOpState) == 28, "VkStencilOpState changed: update
|
||||
static_assert(sizeof(VkVertexInputBindingDescription) == 12, "VkVertexInputBindingDescription changed: update the recipe codec");
|
||||
static_assert(sizeof(VkVertexInputAttributeDescription) == 16, "VkVertexInputAttributeDescription changed: update the recipe codec");
|
||||
#if defined(__linux__) && defined(__x86_64__) && defined(__GLIBCXX__)
|
||||
static_assert(sizeof(State) == 784, "State changed: update CanonicalPipelineState and the recipe codec");
|
||||
static_assert(sizeof(State) == 800, "State changed: update CanonicalPipelineState and the recipe codec");
|
||||
static_assert(sizeof(ShaderStages) == 112, "ShaderStages changed: update the recipe codec");
|
||||
static_assert(sizeof(ShaderRecompiler::MeshConfiguration) == 40, "MeshConfiguration changed: update the recipe codec");
|
||||
static_assert(sizeof(ShaderRecompiler::TessellationConfiguration) == 40, "TessellationConfiguration changed: update the recipe codec");
|
||||
@@ -219,6 +219,10 @@ void encodeState(Writer& writer, const State& state) {
|
||||
writer.Bool(state.mergedCoverage);
|
||||
for (const auto mask : state.quadSampleMask) writer.Raw(mask);
|
||||
writer.U32(state.depthRemap.mode);
|
||||
writer.Bool(state.vertexPoints);
|
||||
writer.Raw(state.pointSize);
|
||||
writer.Raw(state.pointSizeMin);
|
||||
writer.Raw(state.pointSizeMax);
|
||||
}
|
||||
|
||||
void decodeState(Reader& reader, State& state) {
|
||||
@@ -280,6 +284,10 @@ void decodeState(Reader& reader, State& state) {
|
||||
state.mergedCoverage = reader.Bool();
|
||||
for (auto& mask : state.quadSampleMask) mask = reader.Raw<std::uint16_t>();
|
||||
state.depthRemap.mode = reader.U32();
|
||||
state.vertexPoints = reader.Bool();
|
||||
state.pointSize = reader.Raw<float>();
|
||||
state.pointSizeMin = reader.Raw<float>();
|
||||
state.pointSizeMax = reader.Raw<float>();
|
||||
}
|
||||
|
||||
void encodeRecipe(Writer& writer, const GraphicsPipelineRecipe& recipe) {
|
||||
@@ -1053,6 +1061,10 @@ State CanonicalPipelineState(const State& state) {
|
||||
canonical.mergedCoverage = state.mergedCoverage;
|
||||
canonical.quadSampleMask = state.quadSampleMask;
|
||||
canonical.depthRemap.mode = state.depthRemap.mode;
|
||||
canonical.vertexPoints = state.vertexPoints;
|
||||
canonical.pointSize = state.pointSize;
|
||||
canonical.pointSizeMin = state.pointSizeMin;
|
||||
canonical.pointSizeMax = state.pointSizeMax;
|
||||
return canonical;
|
||||
}
|
||||
|
||||
|
||||
@@ -10696,6 +10696,14 @@ void pipelineJournalTests(bool longPath = false, bool extended = false) {
|
||||
GraphicsPipelineRecipe lineDecoded;
|
||||
Require(DecodeGraphicsPipelineRecipe(EncodeGraphicsPipelineRecipe(MakeGraphicsPipelineRecipe(lineState, input, layouts.View(), shaders, VK_IMAGE_LAYOUT_GENERAL)), lineDecoded), "the line strip mesh recipe does not decode");
|
||||
Require(lineDecoded.state.stages.mesh && lineDecoded.state.stages.mesh->outputPrimitiveSize == 2u && lineDecoded.state.stages.mesh->esgsItemSize == 4u, "the recipe dropped the mesh output primitive size");
|
||||
auto pointState = state;
|
||||
pointState.vertexPoints = true;
|
||||
pointState.pointSize = 4.0f;
|
||||
pointState.pointSizeMin = 0.5f;
|
||||
pointState.pointSizeMax = 8.0f;
|
||||
GraphicsPipelineRecipe pointDecoded;
|
||||
Require(DecodeGraphicsPipelineRecipe(EncodeGraphicsPipelineRecipe(MakeGraphicsPipelineRecipe(pointState, input, layouts.View(), shaders, VK_IMAGE_LAYOUT_GENERAL)), pointDecoded), "the point list recipe does not decode");
|
||||
Require(pointDecoded.state.vertexPoints && pointDecoded.state.pointSize == 4.0f && pointDecoded.state.pointSizeMin == 0.5f && pointDecoded.state.pointSizeMax == 8.0f, "the recipe dropped the vertex point list or its point sizes");
|
||||
auto fourSampleState = state;
|
||||
fourSampleState.samples = 4;
|
||||
auto maskState = fourSampleState;
|
||||
|
||||
Reference in new issue
Block a user