Re: [Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-02-21 Thread Tilman Sauerbeck
Tilman Sauerbeck [2012-02-12 11:31]: Marek Olšák [2012-01-23 13:32]: For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. This breaks lighting in Heroes of Newerth on my rv730: http://files.code-monkey.de/frag_color_clamp_bad.png (after

Re: [Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-02-21 Thread Marek Olšák
Hi Tilman, Thanks for the info. I didn't consider outputs to be readable, sorry. A quick fix would be to move the outputs to temps. There is a GLSL pass for that and it can be enabled by reporting PIPE_SHADER_CAP_OUTPUT_READ -- 0 in r600_pipe.c. Can you try that and see if it helps? To Vadim:

Re: [Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-02-21 Thread Jose Fonseca
Draw module (aaline, aapoint, and pstipple stages) will also be broken with PIPE_SHADER_CAP_OUTPUT_READ=1. llvmpipe too, has analysis which rely on outputs not being read. Nothing of the above matters to r600, of course. Nevertheless, I can't help thinking that PIPE_SHADER_CAP_OUTPUT_READ is a

Re: [Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-02-12 Thread Tilman Sauerbeck
Marek Olšák [2012-01-23 13:32]: For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. This breaks lighting in Heroes of Newerth on my rv730: http://files.code-monkey.de/frag_color_clamp_bad.png (after patch)

[Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-01-23 Thread Marek Olšák
For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take into account that r300 can do CLAMPED vertex colors only, while r600 can do

Re: [Mesa-dev] [PATCH 1/3] st/mesa: do vertex and fragment color clamping in shaders

2012-01-23 Thread Brian Paul
On Mon, Jan 23, 2012 at 7:32 AM, Marek Olšák mar...@gmail.com wrote: For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take