mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
pco: Fix for shadow sampler comparison not clamping the compare value
When doing sample comparisons on shadow images the compare value should be clamped to [0,1] Fix: dEQP-VK.glsl.texture_functions.texture.samplercubearrayshadow_fragment Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com> Reviewed-by: Simon Perretta <simon.perretta@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39327>
This commit is contained in:
parent
0eb3eaa806
commit
69a56d33de
1 changed files with 3 additions and 0 deletions
|
|
@ -429,6 +429,9 @@ static nir_def *lower_tex_shadow(nir_builder *b,
|
|||
{
|
||||
nir_def *result_comps[NIR_MAX_VEC_COMPONENTS];
|
||||
|
||||
/* Need to clamp the comparator to the range 0.0 - 1.0 */
|
||||
comparator = nir_fsat(b, comparator);
|
||||
|
||||
for (unsigned u = 0; u < data->num_components; ++u) {
|
||||
result_comps[u] =
|
||||
nir_alphatst_pco(b, nir_channel(b, data, u), comparator, compare_op);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue