Example #1
0
static void
nvc0_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
                         unsigned start, unsigned nr, void **s)
{
   switch (shader) {
   case PIPE_SHADER_VERTEX:
      assert(start == 0);
      nvc0_stage_sampler_states_bind(nvc0_context(pipe), 0, nr, s);
      break;
   case PIPE_SHADER_TESS_CTRL:
      assert(start == 0);
      nvc0_stage_sampler_states_bind(nvc0_context(pipe), 1, nr, s);
      break;
   case PIPE_SHADER_TESS_EVAL:
      assert(start == 0);
      nvc0_stage_sampler_states_bind(nvc0_context(pipe), 2, nr, s);
      break;
   case PIPE_SHADER_GEOMETRY:
      assert(start == 0);
      nvc0_stage_sampler_states_bind(nvc0_context(pipe), 3, nr, s);
      break;
   case PIPE_SHADER_FRAGMENT:
      assert(start == 0);
      nvc0_stage_sampler_states_bind(nvc0_context(pipe), 4, nr, s);
      break;
   case PIPE_SHADER_COMPUTE:
      nvc0_stage_sampler_states_bind_range(nvc0_context(pipe), 5,
                                           start, nr, s);
      nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_SAMPLERS;
      break;
   }
}
Example #2
0
static void
nvc0_cp_sampler_states_bind(struct pipe_context *pipe,
                            unsigned start, unsigned nr, void **cso)
{
   nvc0_stage_sampler_states_bind_range(nvc0_context(pipe), 5, start, nr, cso);

   nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_SAMPLERS;
}