GPU: Change inheritance of depth write and default values

This new inheritance behavior is more beneficial for the metal Backend.
Also change the default depth write behavior of shaders to be unchanged.
This makes fragment shader depth amendment more explicit.

This also add the missing depth_write for metal kernels.
This commit is contained in:
2022-11-27 23:22:32 +01:00
parent d961119563
commit 95003c99d9
3 changed files with 8 additions and 4 deletions

View File

@@ -68,7 +68,9 @@ void ShaderCreateInfo::finalize()
if (info.early_fragment_test_) {
early_fragment_test_ = true;
}
if (info.depth_write_ != DepthWrite::ANY) {
/* Override depth-write with additional info if this specifies a writing mode
* other than the default. */
if (info.depth_write_ != DepthWrite::UNCHANGED) {
depth_write_ = info.depth_write_;
}