mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 12:15:29 +03:00
Add some missed pipeline state members used by Hades
This commit is contained in:
parent
0c6fa22c6b
commit
2c1b40c9a8
@ -439,7 +439,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
|
||||
/* Rasterizer State */
|
||||
void RasterizationState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
||||
manager.Bind(handle, rasterEnable, frontPolygonMode, backPolygonMode, viewportClipControl, oglCullEnable, oglFrontFace, oglCullFace, windowOrigin, provokingVertex, polyOffset);
|
||||
manager.Bind(handle, rasterEnable, frontPolygonMode, backPolygonMode, viewportClipControl, oglCullEnable, oglFrontFace, oglCullFace, windowOrigin, provokingVertex, polyOffset, pointSize, zClipRange);
|
||||
}
|
||||
|
||||
RasterizationState::RasterizationState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine) : engine{manager, dirtyHandle, engine} {}
|
||||
@ -457,8 +457,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RasterizationState::Flush(PackedPipelineState &packedState) {
|
||||
packedState.rasterizerDiscardEnable = !engine->rasterEnable;
|
||||
packedState.SetPolygonMode(engine->frontPolygonMode);
|
||||
@ -475,6 +473,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
packedState.frontFaceClockwise = (packedState.flipYEnable != origFrontFaceClockwise);
|
||||
packedState.depthBiasEnable = ConvertDepthBiasEnable(engine->polyOffset, engine->frontPolygonMode);
|
||||
packedState.provokingVertex = engine->provokingVertex.value;
|
||||
packedState.pointSize = engine->pointSize;
|
||||
packedState.openGlNdc = engine->zClipRange == engine::ZClipRange::NegativeWToPositiveW;
|
||||
}
|
||||
|
||||
/* Depth Stencil State */
|
||||
@ -519,7 +519,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
|
||||
/* Global Shader Config State */
|
||||
void GlobalShaderConfigState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const {
|
||||
manager.Bind(handle, postVtgShaderAttributeSkipMask, bindlessTexture);
|
||||
manager.Bind(handle, postVtgShaderAttributeSkipMask, bindlessTexture, apiMandatedEarlyZ);
|
||||
}
|
||||
|
||||
GlobalShaderConfigState::GlobalShaderConfigState(const EngineRegisters &engine) : engine{engine} {}
|
||||
@ -527,6 +527,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
void GlobalShaderConfigState::Update(PackedPipelineState &packedState) {
|
||||
packedState.postVtgShaderAttributeSkipMask = engine.postVtgShaderAttributeSkipMask;
|
||||
packedState.bindlessTextureConstantBufferSlotSelect = engine.bindlessTexture.constantBufferSlotSelect;
|
||||
packedState.apiMandatedEarlyZ = engine.apiMandatedEarlyZ;
|
||||
}
|
||||
|
||||
/* Pipeline State */
|
||||
|
@ -164,6 +164,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
const engine::ViewportClipControl &viewportClipControl;
|
||||
const engine::PolyOffset &polyOffset;
|
||||
const engine::ProvokingVertex &provokingVertex;
|
||||
const float &pointSize;
|
||||
const engine::ZClipRange &zClipRange;
|
||||
|
||||
void DirtyBind(DirtyManager &manager, dirty::Handle handle) const;
|
||||
};
|
||||
@ -230,6 +232,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
||||
struct EngineRegisters {
|
||||
const std::array<u32, 8> &postVtgShaderAttributeSkipMask;
|
||||
const engine::BindlessTexture &bindlessTexture;
|
||||
const u32 &apiMandatedEarlyZ;
|
||||
|
||||
void DirtyBind(DirtyManager &manager, dirty::Handle handle) const;
|
||||
};
|
||||
|
@ -20,10 +20,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
.vertexInputRegisters = {*registers.vertexStreams, *registers.vertexStreamInstance, *registers.vertexAttributes},
|
||||
.inputAssemblyRegisters = {*registers.primitiveRestartEnable},
|
||||
.tessellationRegisters = {*registers.patchSize, *registers.tessellationParameters},
|
||||
.rasterizationRegisters = {*registers.rasterEnable, *registers.frontPolygonMode, *registers.backPolygonMode, *registers.oglCullEnable, *registers.oglCullFace, *registers.windowOrigin, *registers.oglFrontFace, *registers.viewportClipControl, *registers.polyOffset, *registers.provokingVertex},
|
||||
.rasterizationRegisters = {*registers.rasterEnable, *registers.frontPolygonMode, *registers.backPolygonMode, *registers.oglCullEnable, *registers.oglCullFace, *registers.windowOrigin, *registers.oglFrontFace, *registers.viewportClipControl, *registers.polyOffset, *registers.provokingVertex, *registers.pointSize, *registers.zClipRange},
|
||||
.depthStencilRegisters = {*registers.depthTestEnable, *registers.depthWriteEnable, *registers.depthFunc, *registers.depthBoundsTestEnable, *registers.stencilTestEnable, *registers.twoSidedStencilTestEnable, *registers.stencilOps, *registers.stencilBack},
|
||||
.colorBlendRegisters = {*registers.logicOp, *registers.singleCtWriteControl, *registers.ctWrites, *registers.blendStatePerTargetEnable, *registers.blendPerTargets, *registers.blend},
|
||||
.globalShaderConfigRegisters = {*registers.postVtgShaderAttributeSkipMask, *registers.bindlessTexture}
|
||||
.globalShaderConfigRegisters = {*registers.postVtgShaderAttributeSkipMask, *registers.bindlessTexture, *registers.apiMandatedEarlyZEnable}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,8 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
|
||||
Register<0x60, Inline2MemoryBackend::RegisterState> i2m;
|
||||
|
||||
Register<0x84, u32> apiMandatedEarlyZEnable;
|
||||
|
||||
Register<0xB2, type::SyncpointAction> syncpointAction;
|
||||
|
||||
Register<0xC8, type::TessellationParameters> tessellationParameters;
|
||||
|
Loading…
Reference in New Issue
Block a user