[Mesa-dev] [PATCH] mesa: Clamp GetUniformuiv values to be >= 0.
nhaehnle at gmail.com
Fri Feb 17 09:04:43 UTC 2017
On 16.02.2017 20:24, Antía Puentes wrote:
> On lun, 2016-12-12 at 10:43 +0100, Nicolai Hähnle wrote:
>> On 12.12.2016 00:25, Kenneth Graunke wrote:
>>> Section 2.2.2 (Data Conversions For State Query Commands) of the
>>> OpenGL 4.5 October 24th 2016 specification says:
>>> "If a command returning unsigned integer data is called, such as
>>> GetSamplerParameterIuiv, negative values are clamped to zero."
>>> Fixes GL44-CTS.gpu_shader_fp64.state_query.
>>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>>> src/mesa/main/uniform_query.cpp | 48
>>> 1 file changed, 39 insertions(+), 9 deletions(-)
>>> Hey Nicolai,
>>> I wrote a similar patch a while back, but never got around to
>>> sending it,
>>> since I realized that the gl45release branch expects our current
>>> and the change to make the CTS expect clamping is only on the
>>> master branch.
>>> Apparently I made some additional changes, compared to yours. I
>>> I'd send this along and let you see if you think any of my extra
>>> are still necessary. If so, feel free to fold them into your
>>> I also think we need to fix several other glGet* commands...it's
>>> just that
>>> this is the only one currently tested. A bunch work because the
>>> returned can't be negative.
>> I think your patch is a strict superset of what mine does and should
>> used instead. I do have one comment below, with that fixed it has my
> This patch was never pushed, was it? and GL45-CTS.gpu_shader_fp64.state_query
> fails in the new vk-gl-cts repository because it expects these negative
> values to be clamped.
Fine with me. But again, take Ken's patch, not mine :)
More information about the mesa-dev