diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader.h')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index b2df3546f6..7125a2ae82 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -4,6 +4,12 @@ #include "mtypes.h" #include "bufferobj.h" +#define NVSDBG(fmt, args...) do { \ + if (NOUVEAU_DEBUG & DEBUG_SHADERS) { \ + fprintf(stderr, "%s: "fmt, __func__, ##args); \ + } \ +} while(0) + typedef struct _nvsFunc nvsFunc; #define NVS_MAX_TEMPS 32 @@ -45,6 +51,7 @@ typedef struct _nouveauShader { nvsFunc *func; /* State of the final program */ + GLboolean error; GLboolean translated; GLboolean on_hardware; unsigned int *program; @@ -418,6 +425,12 @@ nvsSwizzle(nvsRegister reg, nvsSwzComp x, nvsSwzComp y, return reg; } +#define nvsProgramError(nvs,fmt,args...) do { \ + fprintf(stderr, "nvsProgramError (%s): "fmt, __func__, ##args); \ + (nvs)->error = GL_TRUE; \ + (nvs)->translated = GL_FALSE; \ +} while(0) + extern GLboolean nvsUpdateShader(GLcontext *ctx, nouveauShader *nvs); extern void nvsDisasmHWShader(nvsPtr); extern void nvsDumpFragmentList(nvsFragmentHeader *f, int lvl); |