~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/mesa/state_tracker/st_context.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:
68
68
#include "util/hash_table.h"
69
69
#include "cso_cache/cso_context.h"
70
70
#include "compiler/glsl/glsl_parser_extras.h"
71
 
#include "nir/nir_to_tgsi.h"
72
71
 
73
 
DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE)
 
72
DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", false)
74
73
 
75
74
/* The list of state update functions. */
76
75
st_update_func_t st_update_functions[ST_NUM_ATOMS];
177
176
      if (ctx->FragmentProgram._Current) {
178
177
         struct gl_program *fp = ctx->FragmentProgram._Current;
179
178
 
180
 
         if (fp->ExternalSamplersUsed || fp->ati_fs)
 
179
         if (fp->ExternalSamplersUsed || fp->ati_fs ||
 
180
            (!fp->shader_program && fp->ShadowSamplers))
181
181
            ctx->NewDriverState |= ST_NEW_FS_STATE;
182
182
      }
183
183
   }
371
371
   if (st->pipe && destroy_pipe)
372
372
      st->pipe->destroy(st->pipe);
373
373
 
 
374
   st->ctx->st = NULL;
374
375
   FREE(st);
375
376
}
376
377
 
618
619
      screen->get_param(screen, PIPE_CAP_INDEP_BLEND_ENABLE);
619
620
   st->has_indep_blend_func =
620
621
      screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC);
621
 
   st->needs_rgb_dst_alpha_override =
622
 
      screen->get_param(screen, PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND);
623
622
   st->can_dither =
624
623
      screen->get_param(screen, PIPE_CAP_DITHERING);
625
624
   st->lower_flatshade =
807
806
 
808
807
   ctx->Const.DriverSupportedPrimMask = screen->get_param(screen, PIPE_CAP_SUPPORTED_PRIM_MODES) |
809
808
                                        /* patches is always supported */
810
 
                                        BITFIELD_BIT(PIPE_PRIM_PATCHES);
 
809
                                        BITFIELD_BIT(MESA_PRIM_PATCHES);
811
810
   st->active_states = _mesa_get_active_states(ctx);
812
811
 
813
812
   return st;
1032
1031
const struct nir_shader_compiler_options *
1033
1032
st_get_nir_compiler_options(struct st_context *st, gl_shader_stage stage)
1034
1033
{
1035
 
   const struct nir_shader_compiler_options *options =
1036
 
      st->ctx->Const.ShaderCompilerOptions[stage].NirOptions;
1037
 
 
1038
 
   if (options) {
1039
 
      return options;
1040
 
   } else {
1041
 
      return nir_to_tgsi_get_compiler_options(st->screen,
1042
 
                                              PIPE_SHADER_IR_NIR,
1043
 
                                              pipe_shader_type_from_mesa(stage));
1044
 
   }
 
1034
   return st->ctx->Const.ShaderCompilerOptions[stage].NirOptions;
1045
1035
}