Re: [Mesa-dev] [PATCH] nv50/ir: handle clipvertex for geometry shaders as well

2018-06-30 Thread Ilia Mirkin
On Sat, Jun 30, 2018 at 4:05 PM, Karol Herbst  wrote:
> On Sat, Jun 30, 2018 at 9:30 PM, Ilia Mirkin  wrote:
>> Tes too, right? Also does the logic that forces recompiles work ok? I seem
>> to recall it was tied to vs.
>>
>
> well, I didn't want to touch stuff where we don't have a piglit test
> yet, so everything else is untested. And as we don't start to expose a
> compatibility profile yet I think it would be fine to do little steps
> for now. I am sure that this works as far as piglit goes.

Sounds like we need the following piglits:

(a) UCP's or gl_ClipVertex usage in a TES
(b) For both GS and TES, adjusting the number of enabled clip planes
up and down (starting low, going high, and then going back down
again).

  -ilia
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] nv50/ir: handle clipvertex for geometry shaders as well

2018-06-30 Thread Karol Herbst
On Sat, Jun 30, 2018 at 9:30 PM, Ilia Mirkin  wrote:
> Tes too, right? Also does the logic that forces recompiles work ok? I seem
> to recall it was tied to vs.
>

well, I didn't want to touch stuff where we don't have a piglit test
yet, so everything else is untested. And as we don't start to expose a
compatibility profile yet I think it would be fine to do little steps
for now. I am sure that this works as far as piglit goes.

> On Sat, Jun 30, 2018, 10:18 Karol Herbst  wrote:
>>
>> this will be needed for compatibility profiles
>>
>> Signed-off-by: Karol Herbst 
>> ---
>>  src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>> b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>> index c92acc996c4..1151e0ee255 100644
>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>> @@ -3613,6 +3613,9 @@ Converter::handleInstruction(const struct
>> tgsi_full_instruction *insn)
>>info->out[info->io.viewportId].slot[0]
>> * 4);
>>   mkStore(OP_EXPORT, TYPE_U32, vpSym, NULL, viewport);
>>}
>> +  /* handle user clip planes for each emitted vertex */
>> +  if (info->io.genUserClip > 0)
>> + handleUserClipPlanes();
>>/* fallthrough */
>> case TGSI_OPCODE_ENDPRIM:
>> {
>> @@ -3787,7 +3790,7 @@ Converter::handleInstruction(const struct
>> tgsi_full_instruction *insn)
>>setPosition(epilogue, true);
>>if (prog->getType() == Program::TYPE_FRAGMENT)
>>   exportOutputs();
>> -  if (info->io.genUserClip > 0)
>> +  if (prog->getType() == Program::TYPE_VERTEX && info->io.genUserClip
>> > 0)
>>   handleUserClipPlanes();
>>mkOp(OP_EXIT, TYPE_NONE, NULL)->terminator = 1;
>> }
>> --
>> 2.17.1
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] nv50/ir: handle clipvertex for geometry shaders as well

2018-06-30 Thread Ilia Mirkin
Tes too, right? Also does the logic that forces recompiles work ok? I seem
to recall it was tied to vs.

On Sat, Jun 30, 2018, 10:18 Karol Herbst  wrote:

> this will be needed for compatibility profiles
>
> Signed-off-by: Karol Herbst 
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> index c92acc996c4..1151e0ee255 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> @@ -3613,6 +3613,9 @@ Converter::handleInstruction(const struct
> tgsi_full_instruction *insn)
>info->out[info->io.viewportId].slot[0]
> * 4);
>   mkStore(OP_EXPORT, TYPE_U32, vpSym, NULL, viewport);
>}
> +  /* handle user clip planes for each emitted vertex */
> +  if (info->io.genUserClip > 0)
> + handleUserClipPlanes();
>/* fallthrough */
> case TGSI_OPCODE_ENDPRIM:
> {
> @@ -3787,7 +3790,7 @@ Converter::handleInstruction(const struct
> tgsi_full_instruction *insn)
>setPosition(epilogue, true);
>if (prog->getType() == Program::TYPE_FRAGMENT)
>   exportOutputs();
> -  if (info->io.genUserClip > 0)
> +  if (prog->getType() == Program::TYPE_VERTEX && info->io.genUserClip
> > 0)
>   handleUserClipPlanes();
>mkOp(OP_EXIT, TYPE_NONE, NULL)->terminator = 1;
> }
> --
> 2.17.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nv50/ir: handle clipvertex for geometry shaders as well

2018-06-30 Thread Karol Herbst
this will be needed for compatibility profiles

Signed-off-by: Karol Herbst 
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index c92acc996c4..1151e0ee255 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -3613,6 +3613,9 @@ Converter::handleInstruction(const struct 
tgsi_full_instruction *insn)
   info->out[info->io.viewportId].slot[0] * 4);
  mkStore(OP_EXPORT, TYPE_U32, vpSym, NULL, viewport);
   }
+  /* handle user clip planes for each emitted vertex */
+  if (info->io.genUserClip > 0)
+ handleUserClipPlanes();
   /* fallthrough */
case TGSI_OPCODE_ENDPRIM:
{
@@ -3787,7 +3790,7 @@ Converter::handleInstruction(const struct 
tgsi_full_instruction *insn)
   setPosition(epilogue, true);
   if (prog->getType() == Program::TYPE_FRAGMENT)
  exportOutputs();
-  if (info->io.genUserClip > 0)
+  if (prog->getType() == Program::TYPE_VERTEX && info->io.genUserClip > 0)
  handleUserClipPlanes();
   mkOp(OP_EXIT, TYPE_NONE, NULL)->terminator = 1;
}
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev