diff options
author | Karol Herbst <[email protected]> | 2018-06-30 04:58:30 +0200 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-07-02 16:21:31 +0200 |
commit | c7726fbfa5f3370baada02f2c6c58f7689809631 (patch) | |
tree | 019755babb170a24ba6b7d7b3f10f07dce2f2d3d /src/gallium | |
parent | 4c8770570549e5093dddb568cdaf168821179451 (diff) |
nv50/ir: handle clipvertex for geom and tess shaders as well
this will be needed for compatibility profiles
v2: handle tess shaders
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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..2f9bcc1f34b 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,9 @@ 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 || + prog->getType() == Program::TYPE_TESSELLATION_EVAL + ) && info->io.genUserClip > 0) handleUserClipPlanes(); mkOp(OP_EXIT, TYPE_NONE, NULL)->terminator = 1; } |