Commit 8fe6bf0b authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Fix the unused arg marker.

parent a950d3a1
......@@ -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:
......
......@@ -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:
......
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment