~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/mesa/program/arbprogparse.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
#include "main/context.h"
58
58
#include "arbprogparse.h"
59
 
#include "programopt.h"
60
59
#include "prog_parameter.h"
61
60
#include "prog_statevars.h"
62
61
#include "prog_instruction.h"
 
62
#include "prog_print.h"
63
63
#include "program_parser.h"
64
64
 
65
65
 
120
120
   program->info.fs.pixel_center_integer = state.option.PixelCenterInteger;
121
121
 
122
122
   program->info.fs.uses_discard = state.fragment.UsesKill;
 
123
   program->arb.Fog = state.option.Fog;
123
124
 
124
125
   ralloc_free(program->arb.Instructions);
125
126
   program->arb.Instructions = prog.arb.Instructions;
128
129
      _mesa_free_parameter_list(program->Parameters);
129
130
   program->Parameters    = prog.Parameters;
130
131
 
131
 
   /* Append fog instructions now if the program has "OPTION ARB_fog_exp"
132
 
    * or similar.  We used to leave this up to drivers, but it appears
133
 
    * there's no hardware that wants to do fog in a discrete stage separate
134
 
    * from the fragment shader.
135
 
    */
136
 
   if (state.option.Fog != OPTION_NONE) {
137
 
      static const GLenum fog_modes[4] = {
138
 
         GL_NONE, GL_EXP, GL_EXP2, GL_LINEAR
139
 
      };
140
 
 
141
 
      /* XXX: we should somehow recompile this to remove clamping if disabled
142
 
       * On the ATI driver, this is unclampled if fragment clamping is disabled
143
 
       */
144
 
      _mesa_append_fog_code(ctx, program, fog_modes[state.option.Fog], GL_TRUE);
145
 
   }
146
 
 
147
132
#if DEBUG_FP
148
133
   printf("____________Fragment program %u ________\n", program->Id);
149
 
   _mesa_print_program(&program->Base);
 
134
   _mesa_print_program(program);
150
135
#endif
151
136
}
152
137