Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v3)

2015-06-26 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sat, Jun 27, 2015 at 1:15 AM, Dave Airlie wrote: > From: Dave Airlie > > This isn't pretty and I'd suggest it the pm4 interface builder > could be tweaked to do this more efficently, but I'd need > guidance on how that would look. > > This seems to pass the fe

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 27 June 2015 at 09:03, Marek Olšák wrote: > If you write VIEWPORT_INDEX at location 0, it overwrites POSITION > which happens to be at location 0 too and that's why the test fails. > > The fix is not to call si_shader_io_get_unique_index (or its caller > get_param_index) for LAYER and VIEWPORT_

[Mesa-dev] [PATCH] radeonsi: add support for viewport array (v3)

2015-06-26 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. v2: handle passing layer/viewport index to fragment shader. fix cras

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Marek Olšák
If you write VIEWPORT_INDEX at location 0, it overwrites POSITION which happens to be at location 0 too and that's why the test fails. The fix is not to call si_shader_io_get_unique_index (or its caller get_param_index) for LAYER and VIEWPORT_INDEX. LAYER and VIEWPORT_INDEX should be ignored in s

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 26 June 2015 at 07:43, Dave Airlie wrote: > On 26 June 2015 at 07:11, Marek Olšák wrote: >> Wait a moment, how did it fail with si_shader_io_get_unique_index? The >> function shouldn't be called for ES with the viewport index, because >> ES can't pass the output to GS. If it was called, ignori

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 07:11, Marek Olšák wrote: > Wait a moment, how did it fail with si_shader_io_get_unique_index? The > function shouldn't be called for ES with the viewport index, because > ES can't pass the output to GS. If it was called, ignoring the > viewport index in si_llvm_emit_es_epilogue

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Marek Olšák
Wait a moment, how did it fail with si_shader_io_get_unique_index? The function shouldn't be called for ES with the viewport index, because ES can't pass the output to GS. If it was called, ignoring the viewport index in si_llvm_emit_es_epilogue should fix it. Marek On Thu, Jun 25, 2015 at 10:29

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Marek Olšák
In that case, feel free to push. Reviewed-by: Marek Olšák Marek On Thu, Jun 25, 2015 at 10:25 PM, Dave Airlie wrote: > On 26 June 2015 at 00:26, Marek Olšák wrote: >> Hi Dave, >> >> The change in si_shader_io_get_unique_index can be dropped. The >> function is only used for shaders before GS.

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Dave Airlie
On 26 June 2015 at 00:26, Marek Olšák wrote: > Hi Dave, > > The change in si_shader_io_get_unique_index can be dropped. The > function is only used for shaders before GS. > Ok okay I was hitting the assert in there for the layer/viewport index cases, but if the patch you pushed to master helps I'l

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-25 Thread Marek Olšák
Hi Dave, The change in si_shader_io_get_unique_index can be dropped. The function is only used for shaders before GS. This looks good, but I've had a different plan for this feature: I'd like the states to be converted into 2 atoms: 1 r600_atom for all 16 viewports 1 r600_atom for all 16 scisso

[Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-24 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. v2: handle passing layer/viewport index to fragment shader. fix cras

[Mesa-dev] [PATCH] radeonsi: add support for viewport array

2015-06-24 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_bli