diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp index 540b0494..c9abcfa0 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.cpp @@ -87,7 +87,7 @@ namespace skyline::gpu::interconnect::maxwell3d { /* Depth Render Target */ void DepthRenderTargetState::EngineRegisters::DirtyBind(DirtyManager &manager, dirty::Handle handle) const { - manager.Bind(handle, ztSize, ztOffset, ztFormat, ztBlockSize, ztArrayPitch, ztSelect, ztLayer, surfaceClip); + manager.Bind(handle, ztSize, ztOffset, ztFormat, ztBlockSize, ztArrayPitchLsr2, ztSelect, ztLayer, surfaceClip); } DepthRenderTargetState::DepthRenderTargetState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine) : engine{manager, dirtyHandle, engine} {} @@ -121,7 +121,7 @@ namespace skyline::gpu::interconnect::maxwell3d { .blockDepth = engine->ztBlockSize.BlockDepth(), }; - guest.layerStride = (guest.baseArrayLayer > 1 || guest.layerCount > 1) ? engine->ztArrayPitch : 0; + guest.layerStride = (guest.baseArrayLayer > 1 || guest.layerCount > 1) ? engine->ZtArrayPitch() : 0; auto mappings{ctx.channelCtx.asCtx->gmmu.TranslateRange(engine->ztOffset, guest.GetSize())}; guest.mappings.assign(mappings.begin(), mappings.end()); diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h index 33e60ac0..31e89dd9 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/pipeline_state.h @@ -40,12 +40,16 @@ namespace skyline::gpu::interconnect::maxwell3d { const soc::gm20b::engine::Address &ztOffset; const engine::ZtFormat &ztFormat; const engine::ZtBlockSize &ztBlockSize; - const u32 &ztArrayPitch; + const u32 &ztArrayPitchLsr2; const engine::ZtSelect &ztSelect; const engine::ZtLayer &ztLayer; const engine::SurfaceClip &surfaceClip; void DirtyBind(DirtyManager &manager, dirty::Handle handle) const; + + u32 ZtArrayPitch() const { + return ztArrayPitchLsr2 << 2; + } }; private: