panfrost: change default rounding mode for samplers

The SamplerDescriptor structure has a field which describes how
floating point coordinates should be converted to fixed point.
Setting this to "true" (which causes round to nearest even) fixes
a failing CTS test.

The CTS test in question is:
dEQP-GLES31.functional.texture.border_clamp.range_clamp.linear_float_color

The OpenGL spec is somewhat vague about how rounding is to be
performed, so it appears both settings should be legal; this may
indicate a problem with the CTS. Nevertheless "round to nearest even"
is probably a better default and since it fixes the failing test we
may as well use it.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29464>
(cherry picked from commit d91d2c275e)
This commit is contained in:
Eric R. Smith 2024-05-29 10:45:23 -03:00 committed by Eric Engestrom
parent 869a117030
commit 91db0990f0
5 changed files with 5 additions and 5 deletions

View file

@ -364,7 +364,7 @@
"description": "panfrost: change default rounding mode for samplers",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1018,7 +1018,7 @@
<field name="Wrap Mode R" size="4" start="0:8" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode T" size="4" start="0:12" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode S" size="4" start="0:16" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="false"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="true"/>
<!--- Disable sRGB-to-linear conversion (assume linear) -->
<field name="sRGB override" size="1" start="0:22" type="bool" default="false"/>
<field name="Seamless Cube Map" size="1" start="0:23" type="bool" default="true"/>

View file

@ -632,7 +632,7 @@
<field name="Wrap Mode R" size="4" start="0:8" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode T" size="4" start="0:12" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode S" size="4" start="0:16" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="false"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="true"/>
<!--- Disable sRGB-to-linear conversion (assume linear) -->
<field name="sRGB override" size="1" start="0:22" type="bool" default="false"/>
<field name="Seamless Cube Map" size="1" start="0:23" type="bool" default="true"/>

View file

@ -696,7 +696,7 @@
<field name="Wrap Mode R" size="4" start="0:8" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode T" size="4" start="0:12" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode S" size="4" start="0:16" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="false"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="true"/>
<!--- Disable sRGB-to-linear conversion (assume linear) -->
<field name="sRGB override" size="1" start="0:22" type="bool" default="false"/>
<field name="Seamless Cube Map" size="1" start="0:23" type="bool" default="true"/>

View file

@ -623,7 +623,7 @@
<field name="Wrap Mode R" size="4" start="0:8" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode T" size="4" start="0:12" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Wrap Mode S" size="4" start="0:16" type="Wrap Mode" default="Clamp to Edge"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="false"/>
<field name="Round to nearest even" size="1" start="0:21" type="bool" default="true"/>
<!--- Disable sRGB-to-linear conversion (assume linear) -->
<field name="sRGB override" size="1" start="0:22" type="bool" default="false"/>
<field name="Seamless Cube Map" size="1" start="0:23" type="bool" default="true"/>