diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-03-20 15:52:57 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-03-20 16:08:07 +1100 |
commit | 4185037af2d89c5b245646f5e4a7c6dc946cae43 (patch) | |
tree | 4fb27ae3b9977a68a88ec921326448850d6eb438 /src/mesa/drivers/dri/nouveau/nouveau_shader.h | |
parent | 9622a634f61f02ed1a23087762a2ec8a305ae77e (diff) |
nouveau: fail translate if we use too many params somehow
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader.h')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h index 56ae270764..7125a2ae82 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h @@ -51,6 +51,7 @@ typedef struct _nouveauShader { nvsFunc *func; /* State of the final program */ + GLboolean error; GLboolean translated; GLboolean on_hardware; unsigned int *program; @@ -424,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); |