mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 10:25:29 +03:00
Implement GPU depthMode register
This controls the depth range used by the shader, hades already has support for the necessary patching so we only need to pass the current mode over to it and it'll do the necessary work.
This commit is contained in:
parent
7e088ca465
commit
fc2c123ae2
@ -1152,6 +1152,10 @@ namespace skyline::gpu::interconnect {
|
||||
rasterizerState.get<vk::PipelineRasterizationStateCreateInfo>().depthBiasSlopeFactor = factor;
|
||||
}
|
||||
|
||||
void SetDepthMode(maxwell3d::DepthMode mode) {
|
||||
UpdateRuntimeInformation(runtimeInfo.convert_depth_mode, mode == maxwell3d::DepthMode::MinusOneToOne, maxwell3d::PipelineStage::Vertex, maxwell3d::PipelineStage::Geometry);
|
||||
}
|
||||
|
||||
/* Color Blending */
|
||||
private:
|
||||
std::array<vk::PipelineColorBlendAttachmentState, maxwell3d::RenderTargetCount> commonRtBlendState{}, independentRtBlendState{}; //!< Per-RT blending state for common/independent blending for trivial toggling behavior
|
||||
|
@ -761,5 +761,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d::type {
|
||||
} format;
|
||||
};
|
||||
|
||||
enum class DepthMode : u32 {
|
||||
MinusOneToOne = 0,
|
||||
ZeroToOne = 1
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
}
|
||||
|
@ -668,6 +668,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
BOOST_PP_REPEAT(16, CBUF_UPDATE_CALLBACKS, 0)
|
||||
#undef CBUF_UPDATE_CALLBACKS
|
||||
|
||||
MAXWELL3D_CASE(depthMode, {
|
||||
context.SetDepthMode(depthMode);
|
||||
})
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -66,6 +66,8 @@ namespace skyline::soc::gm20b::engine::maxwell3d {
|
||||
Register<0x35D, u32> drawVertexFirst; //!< The first vertex to draw
|
||||
Register<0x35E, u32> drawVertexCount; //!< The amount of vertices to draw, calling this method triggers non-indexed drawing
|
||||
|
||||
Register<0x35F, type::DepthMode> depthMode;
|
||||
|
||||
Register<0x360, std::array<u32, 4>> clearColorValue;
|
||||
Register<0x364, float> clearDepthValue;
|
||||
Register<0x368, u32> clearStencilValue;
|
||||
|
Loading…
Reference in New Issue
Block a user