[Mesa-dev] [PATCH 4/4] nv50/ir: Replace NV50_PROGRAM_IR_* by PIPE_SHADER_IR_*

Ilia Mirkin imirkin at alum.mit.edu
Sat May 6 21:50:14 UTC 2017


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Sat, May 6, 2017 at 5:47 PM, Pierre Moreau <pierre.morrow at free.fr> wrote:
> Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir.cpp      | 2 +-
>  src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 7 +------
>  src/gallium/drivers/nouveau/nouveau_compiler.c       | 2 +-
>  src/gallium/drivers/nouveau/nv50/nv50_program.c      | 4 +++-
>  src/gallium/drivers/nouveau/nvc0/nvc0_program.c      | 2 +-
>  5 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> index f811781756..a000bcbd32 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> @@ -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:
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
> index e7d840df00..1962ead35a 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h
> @@ -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;
> diff --git a/src/gallium/drivers/nouveau/nouveau_compiler.c b/src/gallium/drivers/nouveau/nouveau_compiler.c
> index d8009f5bfe..3151a6f420 100644
> --- a/src/gallium/drivers/nouveau/nouveau_compiler.c
> +++ b/src/gallium/drivers/nouveau/nouveau_compiler.c
> @@ -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;
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers/nouveau/nv50/nv50_program.c
> index 76d06aeddf..92e73f8c12 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_program.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_program.c
> @@ -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;
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
> index 6cc518309c..27740bc87f 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
> @@ -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
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list