mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
v3d: set depth compare function correctly
Depth compare function must be set to the configured one only when compare mode is enabled; otherwise it must be configured to never. v2 (Eric): - Handle V3D < 4.0 case CC: mesa-stable Reviewed-by: Eric Engestrom <eric@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22470>
This commit is contained in:
parent
c84989c4cf
commit
82c2258019
1 changed files with 6 additions and 3 deletions
|
|
@ -548,8 +548,9 @@ v3d_upload_sampler_state_variant(void *map,
|
|||
sampler.wrap_r = translate_wrap(cso->wrap_r);
|
||||
|
||||
sampler.fixed_bias = cso->lod_bias;
|
||||
sampler.depth_compare_function = cso->compare_func;
|
||||
|
||||
sampler.depth_compare_function = cso->compare_mode ?
|
||||
cso->compare_func :
|
||||
V3D_COMPARE_FUNC_NEVER;
|
||||
sampler.min_filter_nearest =
|
||||
cso->min_img_filter == PIPE_TEX_FILTER_NEAREST;
|
||||
sampler.mag_filter_nearest =
|
||||
|
|
@ -792,7 +793,9 @@ v3d_create_sampler_state(struct pipe_context *pctx,
|
|||
}
|
||||
|
||||
v3dx_pack(&so->texture_shader_state, TEXTURE_SHADER_STATE, tex) {
|
||||
tex.depth_compare_function = cso->compare_func;
|
||||
tex.depth_compare_function = cso->compare_mode ?
|
||||
cso->compare_func :
|
||||
V3D_COMPARE_FUNC_NEVER;
|
||||
tex.fixed_bias = cso->lod_bias;
|
||||
}
|
||||
#endif /* V3D_VERSION < 40 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue