mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 13:40:37 +02:00
panvk: disable depth write when depth test is disabled
The spec says depthWriteEnable controls whether depth writes are enabled when depthTestEnable is VK_TRUE. Depth writes are always disabled when depthTestEnable is VK_FALSE. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-By: Benjamin Lee <benjamin.lee@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31878>
This commit is contained in:
parent
09a2de2a51
commit
cc1c663152
1 changed files with 1 additions and 1 deletions
|
|
@ -1116,7 +1116,7 @@ prepare_ds(struct panvk_cmd_buffer *cmdbuf)
|
|||
|
||||
if (fs)
|
||||
cfg.depth_source = pan_depth_source(&fs->info);
|
||||
cfg.depth_write_enable = ds->depth.write_enable;
|
||||
cfg.depth_write_enable = test_z && ds->depth.write_enable;
|
||||
cfg.depth_bias_enable = rs->depth_bias.enable;
|
||||
cfg.depth_function = test_z ? translate_compare_func(ds->depth.compare_op)
|
||||
: MALI_FUNC_ALWAYS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue