diff options
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_program.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_program.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c index 3c59213176e..bcee027917e 100644 --- a/src/gallium/drivers/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nvc0/nvc0_program.c @@ -23,8 +23,6 @@ #include "pipe/p_shader_tokens.h" #include "pipe/p_defines.h" -#define NOUVEAU_DEBUG - #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_util.h" #include "tgsi/tgsi_dump.h" @@ -225,6 +223,9 @@ nvc0_interp_mode(const struct tgsi_full_declaration *decl) if (decl->Declaration.Interpolate == TGSI_INTERPOLATE_PERSPECTIVE) mode = NVC0_INTERP_PERSPECTIVE; else + if (decl->Declaration.Semantic && decl->Semantic.Name == TGSI_SEMANTIC_COLOR) + mode = NVC0_INTERP_PERSPECTIVE; + else mode = NVC0_INTERP_LINEAR; if (decl->Declaration.Centroid) @@ -574,7 +575,7 @@ nvc0_prog_scan(struct nvc0_translation_info *ti) int ret; unsigned i; -#ifdef NOUVEAU_DEBUG +#if NV50_DEBUG & NV50_DEBUG_SHADER tgsi_dump(prog->pipe.tokens, 0); #endif @@ -691,12 +692,12 @@ nvc0_program_translate(struct nvc0_program *prog) if (ret) NOUVEAU_ERR("shader translation failed\n"); - { - unsigned i; - for (i = 0; i < sizeof(prog->hdr) / sizeof(prog->hdr[0]); ++i) - debug_printf("HDR[%02lx] = 0x%08x\n", - i * sizeof(prog->hdr[0]), prog->hdr[i]); - } +#if NV50_DEBUG & NV50_DEBUG_SHADER + unsigned i; + for (i = 0; i < sizeof(prog->hdr) / sizeof(prog->hdr[0]); ++i) + debug_printf("HDR[%02lx] = 0x%08x\n", + i * sizeof(prog->hdr[0]), prog->hdr[i]); +#endif out: if (ti->immd32) |