iris: Move things to iris_shader_state

We didn't originally have this struct, so we had lots of ad-hoc arrays.
Now that we have it, it makes sense to group things there.
This commit is contained in:
Kenneth Graunke
2018-08-18 23:43:14 -07:00
parent 410a555bfb
commit b75b52530a
2 changed files with 28 additions and 23 deletions

View File

@@ -240,6 +240,12 @@ struct iris_shader_state {
struct iris_const_buffer constbuf[PIPE_MAX_CONSTANT_BUFFERS];
struct pipe_resource *ssbo[PIPE_MAX_SHADER_BUFFERS];
struct iris_state_ref ssbo_surface_state[PIPE_MAX_SHADER_BUFFERS];
struct iris_state_ref sampler_table;
struct iris_sampler_state *samplers[IRIS_MAX_TEXTURE_SAMPLERS];
struct iris_sampler_view *textures[IRIS_MAX_TEXTURE_SAMPLERS];
unsigned num_samplers;
unsigned num_textures;
};
/**
@@ -344,12 +350,8 @@ struct iris_context {
struct iris_shader_state shaders[MESA_SHADER_STAGES];
struct iris_state_ref sampler_table[MESA_SHADER_STAGES];
/** Do any samplers (for any stage) need border color? */
bool need_border_colors;
struct iris_sampler_state *samplers[MESA_SHADER_STAGES][IRIS_MAX_TEXTURE_SAMPLERS];
struct iris_sampler_view *textures[MESA_SHADER_STAGES][IRIS_MAX_TEXTURE_SAMPLERS];
unsigned num_samplers[MESA_SHADER_STAGES];
unsigned num_textures[MESA_SHADER_STAGES];
struct pipe_stream_output_target *so_target[PIPE_MAX_SO_BUFFERS];
bool streamout_active;