nv50/ir: Replace NV50_PROGRAM_IR_* by PIPE_SHADER_IR_*
authorPierre Moreau <pierre.morrow@free.fr>
Sat, 6 May 2017 21:47:23 +0000 (23:47 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 7 May 2017 14:26:37 +0000 (10:26 -0400)
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
src/gallium/drivers/nouveau/nouveau_compiler.c
src/gallium/drivers/nouveau/nv50/nv50_program.c
src/gallium/drivers/nouveau/nvc0/nvc0_program.c

index f811781756e8520ad396f4e2cebcfddd00ba626a..a000bcbd32f15c862185b53b2fae7c893d6a30f9 100644 (file)
@@ -1233,7 +1233,7 @@ nv50_ir_generate_code(struct nv50_ir_prog_info *info)
    prog->optLevel = info->optLevel;
 
    switch (info->bin.sourceRep) {
-   case NV50_PROGRAM_IR_TGSI:
+   case PIPE_SHADER_IR_TGSI:
       ret = prog->makeFromTGSI(info) ? 0 : -2;
       break;
    default:
index e7d840df00a1d8ec028314088e4b3644d2ea7235..1962ead35a06ab8307c2d9e0a3f696e936ec3434 100644 (file)
@@ -54,11 +54,6 @@ struct nv50_ir_varying
    ubyte si; /* TGSI semantic index */
 };
 
-#define NV50_PROGRAM_IR_TGSI 0
-#define NV50_PROGRAM_IR_SM4  1
-#define NV50_PROGRAM_IR_GLSL 2
-#define NV50_PROGRAM_IR_LLVM 3
-
 #ifdef DEBUG
 # define NV50_IR_DEBUG_BASIC     (1 << 0)
 # define NV50_IR_DEBUG_VERBOSE   (2 << 0)
@@ -95,7 +90,7 @@ struct nv50_ir_prog_info
       uint32_t *code;
       uint32_t codeSize;
       uint32_t instructions;
-      uint8_t sourceRep;  /* NV50_PROGRAM_IR */
+      uint8_t sourceRep;  /* PIPE_SHADER_IR_* */
       const void *source;
       void *relocData;
       void *fixupData;
index d8009f5bfe4352d2cad11d480dc428e869ccd8f4..3151a6f420ceb63186c56083b09f5092ae7e290f 100644 (file)
@@ -109,7 +109,7 @@ nouveau_codegen(int chipset, int type, struct tgsi_token tokens[],
 
    info.type = type;
    info.target = chipset;
-   info.bin.sourceRep = NV50_PROGRAM_IR_TGSI;
+   info.bin.sourceRep = PIPE_SHADER_IR_TGSI;
    info.bin.source = tokens;
 
    info.io.auxCBSlot = 15;
index 76d06aeddfef14caf546075f25a6d6b63e93263e..92e73f8c12c6dd9a3dd97afe887097781f21dd16 100644 (file)
@@ -20,6 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "pipe/p_defines.h"
+
 #include "nv50/nv50_program.h"
 #include "nv50/nv50_context.h"
 
@@ -331,7 +333,7 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset,
 
    info->type = prog->type;
    info->target = chipset;
-   info->bin.sourceRep = NV50_PROGRAM_IR_TGSI;
+   info->bin.sourceRep = PIPE_SHADER_IR_TGSI;
    info->bin.source = (void *)prog->pipe.tokens;
 
    info->io.auxCBSlot = 15;
index 6cc518309cd95ecb67cfae8104123e41888a4716..27740bc87f27584cfdcc7aa387ebbdb24c150d1a 100644 (file)
@@ -567,7 +567,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
 
    info->type = prog->type;
    info->target = chipset;
-   info->bin.sourceRep = NV50_PROGRAM_IR_TGSI;
+   info->bin.sourceRep = PIPE_SHADER_IR_TGSI;
    info->bin.source = (void *)prog->pipe.tokens;
 
 #ifdef DEBUG