diff options
author | Timothy Arceri <[email protected]> | 2016-10-19 13:23:37 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | 3423488d55b9c483fcdb3996eb89b424c1031d24 (patch) | |
tree | 270d90fe3fd4c090f2c8e59a3b20d0afe7d98e72 /src/mesa/program/arbprogparse.c | |
parent | 17e28a1571b6141368fefc84cc8b0a3b4e52f8ee (diff) |
st/mesa/r200/i915/i965: eliminate gl_fragment_program
Here we move OriginUpperLeft and PixelCenterInteger into gl_program
all other fields have been replace by shader_info.
V2: Don't use anonymous union/structs to hold vertex/fragment fields
suggested by Ian.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/program/arbprogparse.c')
-rw-r--r-- | src/mesa/program/arbprogparse.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 82bdd133024..51cefe33faa 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -67,7 +67,7 @@ having three separate program parameter arrays. void _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, const GLvoid *str, GLsizei len, - struct gl_fragment_program *program) + struct gl_program *program) { struct gl_program prog; struct asm_parser_state state; @@ -85,48 +85,48 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, return; } - free(program->Base.String); + free(program->String); /* Copy the relevant contents of the arb_program struct into the * fragment_program struct. */ - program->Base.String = prog.String; - program->Base.NumInstructions = prog.NumInstructions; - program->Base.NumTemporaries = prog.NumTemporaries; - program->Base.NumParameters = prog.NumParameters; - program->Base.NumAttributes = prog.NumAttributes; - program->Base.NumAddressRegs = prog.NumAddressRegs; - program->Base.NumNativeInstructions = prog.NumNativeInstructions; - program->Base.NumNativeTemporaries = prog.NumNativeTemporaries; - program->Base.NumNativeParameters = prog.NumNativeParameters; - program->Base.NumNativeAttributes = prog.NumNativeAttributes; - program->Base.NumNativeAddressRegs = prog.NumNativeAddressRegs; - program->Base.NumAluInstructions = prog.NumAluInstructions; - program->Base.NumTexInstructions = prog.NumTexInstructions; - program->Base.NumTexIndirections = prog.NumTexIndirections; - program->Base.NumNativeAluInstructions = prog.NumAluInstructions; - program->Base.NumNativeTexInstructions = prog.NumTexInstructions; - program->Base.NumNativeTexIndirections = prog.NumTexIndirections; - program->Base.InputsRead = prog.InputsRead; - program->Base.OutputsWritten = prog.OutputsWritten; - program->Base.IndirectRegisterFiles = prog.IndirectRegisterFiles; + program->String = prog.String; + program->NumInstructions = prog.NumInstructions; + program->NumTemporaries = prog.NumTemporaries; + program->NumParameters = prog.NumParameters; + program->NumAttributes = prog.NumAttributes; + program->NumAddressRegs = prog.NumAddressRegs; + program->NumNativeInstructions = prog.NumNativeInstructions; + program->NumNativeTemporaries = prog.NumNativeTemporaries; + program->NumNativeParameters = prog.NumNativeParameters; + program->NumNativeAttributes = prog.NumNativeAttributes; + program->NumNativeAddressRegs = prog.NumNativeAddressRegs; + program->NumAluInstructions = prog.NumAluInstructions; + program->NumTexInstructions = prog.NumTexInstructions; + program->NumTexIndirections = prog.NumTexIndirections; + program->NumNativeAluInstructions = prog.NumAluInstructions; + program->NumNativeTexInstructions = prog.NumTexInstructions; + program->NumNativeTexIndirections = prog.NumTexIndirections; + program->InputsRead = prog.InputsRead; + program->OutputsWritten = prog.OutputsWritten; + program->IndirectRegisterFiles = prog.IndirectRegisterFiles; for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) { - program->Base.TexturesUsed[i] = prog.TexturesUsed[i]; + program->TexturesUsed[i] = prog.TexturesUsed[i]; if (prog.TexturesUsed[i]) - program->Base.SamplersUsed |= (1 << i); + program->SamplersUsed |= (1 << i); } - program->Base.ShadowSamplers = prog.ShadowSamplers; + program->ShadowSamplers = prog.ShadowSamplers; program->OriginUpperLeft = state.option.OriginUpperLeft; program->PixelCenterInteger = state.option.PixelCenterInteger; - program->Base.info.fs.uses_discard = state.fragment.UsesKill; + program->info.fs.uses_discard = state.fragment.UsesKill; - free(program->Base.Instructions); - program->Base.Instructions = prog.Instructions; + free(program->Instructions); + program->Instructions = prog.Instructions; - if (program->Base.Parameters) - _mesa_free_parameter_list(program->Base.Parameters); - program->Base.Parameters = prog.Parameters; + if (program->Parameters) + _mesa_free_parameter_list(program->Parameters); + program->Parameters = prog.Parameters; /* Append fog instructions now if the program has "OPTION ARB_fog_exp" * or similar. We used to leave this up to drivers, but it appears @@ -145,7 +145,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, } #if DEBUG_FP - printf("____________Fragment program %u ________\n", program->Base.Id); + printf("____________Fragment program %u ________\n", program->Id); _mesa_print_program(&program->Base); #endif } |