From 8fe6bf0bad060ffe4e27c03ec51e0360221824b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 5 Aug 2008 14:50:56 -0500 Subject: [PATCH] wined3d: Fix the unused arg marker. --- dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/ati_fragment_shader.c | 2 +- dlls/wined3d/utils.c | 5 ++--- dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 21eb8151054..40f33e19faa 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -2369,7 +2369,7 @@ static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, W static const char *get_argreg(SHADER_BUFFER *buffer, DWORD argnum, unsigned int stage, DWORD arg) { const char *ret; - if(arg > WINED3DTOP_LERP) return "unused"; /* This is the marker for unused registers */ + if(arg == ARG_UNUSED) return "unused"; /* This is the marker for unused registers */ switch(arg & WINED3DTA_SELECTMASK) { case WINED3DTA_DIFFUSE: diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index d6c133cfe29..8e3ed184d9d 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -153,7 +153,7 @@ static GLuint register_for_arg(DWORD arg, WineD3D_GL_Info *gl_info, unsigned int GLenum ret; if(mod) *mod = GL_NONE; - if(arg == 0xFFFFFFFF) return -1; /* This is the marker for unused registers */ + if(arg == ARG_UNUSED) return -1; /* This is the marker for unused registers */ switch(arg & WINED3DTA_SELECTMASK) { case WINED3DTA_DIFFUSE: diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6f3a447c911..e56b4b98d7d 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1817,9 +1817,8 @@ void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *setting if(stateblock->textureState[i][WINED3DTSS_COLOROP] == WINED3DTOP_DISABLE) { settings->op[i].cop = WINED3DTOP_DISABLE; settings->op[i].aop = WINED3DTOP_DISABLE; - /* 0x3F: set all 6 bits of the args to 1 */ - settings->op[i].carg0 = settings->op[i].carg1 = settings->op[i].carg2 = 0x3F; - settings->op[i].aarg0 = settings->op[i].aarg1 = settings->op[i].aarg2 = 0x3F; + settings->op[i].carg0 = settings->op[i].carg1 = settings->op[i].carg2 = ARG_UNUSED; + settings->op[i].aarg0 = settings->op[i].aarg1 = settings->op[i].aarg2 = ARG_UNUSED; settings->op[i].color_correction = WINED3DFMT_UNKNOWN; settings->op[i].dst = resultreg; settings->op[i].tex_type = tex_1d; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e4c6a41fe2d..e2b1215960a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -760,6 +760,7 @@ enum dst_arg struct texture_stage_op { unsigned cop : 5, aop : 5; +#define ARG_UNUSED 0x3f unsigned carg1 : 6, carg2 : 6, carg0 : 6; unsigned tex_type : 3; unsigned dst : 1; /* Total of 32 bits */