nouveau/codegen: Do not keep redundant info for tessellation domain
authorGeorge Ouzounoudis <geothrock@gmail.com>
Sun, 30 Jul 2023 12:31:56 +0000 (15:31 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:06 +0000 (21:32 +0000)
Just add an assert instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/codegen/nv50_ir_driver.h
src/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index fdd8b21..8a3f637 100644 (file)
@@ -103,9 +103,6 @@ struct nv50_ir_prog_info
          uint32_t gridInfoBase;  /* base address for NTID,NCTAID */
          uint16_t numThreads[3]; /* max number of threads */
       } cp;
-      struct {
-         uint8_t prespecified_domain; /* MESA_PRIM_{QUADS,TRIANGLES,LINES}, POINTS if unspecified */
-      } tese;
    } prop;
 
    struct {
index da1f04e..dfe7732 100644 (file)
@@ -2916,17 +2916,13 @@ NVC0LoweringPass::handleLDST(Instruction *i)
 void
 NVC0LoweringPass::readTessCoord(LValue *dst, int c)
 {
-   // GLSL requires domain qualifier to be defined in TES while SPIRV allows
-   // domain to be defined in TES and/or TCS
-   uint8_t domain = prog->driver_out->prop.tp.domain;
-   const bool tese_defined_domain =
+   // In case of SPIRV the domain can be specified in the tesc shader,
+   // but this should be passed to tese shader by merge_tess_info.
+   const uint8_t domain = prog->driver_out->prop.tp.domain;
+   assert(
       domain == MESA_PRIM_LINES ||
       domain == MESA_PRIM_TRIANGLES ||
-      domain == MESA_PRIM_QUADS;
-
-   if (!tese_defined_domain) {
-      domain = prog->driver->prop.tese.prespecified_domain;
-   }
+      domain == MESA_PRIM_QUADS);
 
    Value *laneid = bld.getSSA();
    Value *x, *y;