diff options
author | Brian Paul <[email protected]> | 2006-10-10 21:43:31 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-10 21:43:31 +0000 |
commit | 39c4daa6bc15a83a97c3c0b456bf1795ef9e6099 (patch) | |
tree | 577143aee8c5108f4370daaa610458c1ad9c48e8 /src/mesa/shader | |
parent | 97a659337e6effe439434258350498311052f4af (diff) |
Move the fp_machine struct into s_nvfragmprog.c since (except for program
debug) it's only used there.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/program.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index f999e0695ba..8aed74110c0 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -2163,7 +2163,8 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, "glGetProgramRegisterfvMESA(registerName)"); return; } - COPY_4V(v, ctx->FragmentProgram.Machine.Temporaries[i]); + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_TEMPORARY, + i, v); } else if (reg[0] == 'f' && reg[1] == '[') { /* Fragment input attribute */ @@ -2171,7 +2172,8 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, for (i = 0; i < ctx->Const.FragmentProgram.MaxAttribs; i++) { const char *name = _mesa_nv_fragment_input_register_name(i); if (_mesa_strncmp(reg + 2, name, 4) == 0) { - COPY_4V(v, ctx->FragmentProgram.Machine.Inputs[i]); + ctx->Driver.GetFragmentProgramRegister(ctx, + PROGRAM_INPUT, i, v); return; } } @@ -2181,15 +2183,18 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, } else if (_mesa_strcmp(reg, "o[COLR]") == 0) { /* Fragment output color */ - COPY_4V(v, ctx->FragmentProgram.Machine.Outputs[FRAG_RESULT_COLR]); + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLR, v); } else if (_mesa_strcmp(reg, "o[COLH]") == 0) { /* Fragment output color */ - COPY_4V(v, ctx->FragmentProgram.Machine.Outputs[FRAG_RESULT_COLH]); + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_COLH, v); } else if (_mesa_strcmp(reg, "o[DEPR]") == 0) { /* Fragment output depth */ - COPY_4V(v, ctx->FragmentProgram.Machine.Outputs[FRAG_RESULT_DEPR]); + ctx->Driver.GetFragmentProgramRegister(ctx, PROGRAM_OUTPUT, + FRAG_RESULT_DEPR, v); } else { /* try user-defined identifiers */ @@ -2210,5 +2215,4 @@ _mesa_GetProgramRegisterfvMESA(GLenum target, "glGetProgramRegisterfvMESA(target)"); return; } - } |