#include "st_program.h"
#include "st_manager.h"
+typedef void (*update_func_t)(struct st_context *st);
/* The list state update functions. */
-static const struct st_tracked_state *atoms[] =
+static const update_func_t update_functions[] =
{
-#define ST_STATE(FLAG, st_update) &st_update,
+#define ST_STATE(FLAG, st_update) st_update,
#include "st_atom_list.h"
#undef ST_STATE
};
void st_init_atoms( struct st_context *st )
{
- STATIC_ASSERT(ARRAY_SIZE(atoms) <= 64);
+ STATIC_ASSERT(ARRAY_SIZE(update_functions) <= 64);
}
* Don't use u_bit_scan64, it may be slower on 32-bit.
*/
while (dirty_lo)
- atoms[u_bit_scan(&dirty_lo)]->update(st);
+ update_functions[u_bit_scan(&dirty_lo)](st);
while (dirty_hi)
- atoms[32 + u_bit_scan(&dirty_hi)]->update(st);
+ update_functions[32 + u_bit_scan(&dirty_hi)](st);
/* Clear the render or compute state bits. */
st->dirty &= ~pipeline_mask;
ST_PIPELINE_COMPUTE,
};
-struct st_tracked_state {
- void (*update)( struct st_context *st );
-};
-
-
void st_init_atoms( struct st_context *st );
void st_destroy_atoms( struct st_context *st );
void st_validate_state( struct st_context *st, enum st_pipeline pipeline );
#include "st_atom_list.h"
#undef ST_STATE
-/* Add extern struct declarations. */
-#define ST_STATE(FLAG, st_update) extern const struct st_tracked_state st_update;
+/* Declare function prototypes. */
+#define ST_STATE(FLAG, st_update) void st_update(struct st_context *st);
#include "st_atom_list.h"
#undef ST_STATE
return TRUE;
}
-static void update_array(struct st_context *st)
+void st_update_array(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
const struct gl_vertex_array **arrays = ctx->Array._DrawArrays;
st->last_num_vbuffers = num_vbuffers;
cso_set_vertex_elements(st->cso_context, vpv->num_inputs, velements);
}
-
-
-const struct st_tracked_state st_update_array = {
- update_array /* update */
-};
}
}
-static void
-bind_vs_atomics(struct st_context *st)
+void
+st_bind_vs_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
st_bind_atomics(st, prog, PIPE_SHADER_VERTEX);
}
-const struct st_tracked_state st_bind_vs_atomics = {
- bind_vs_atomics
-};
-
-static void
-bind_fs_atomics(struct st_context *st)
+void
+st_bind_fs_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
st_bind_atomics(st, prog, PIPE_SHADER_FRAGMENT);
}
-const struct st_tracked_state st_bind_fs_atomics = {
- bind_fs_atomics
-};
-
-static void
-bind_gs_atomics(struct st_context *st)
+void
+st_bind_gs_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_atomics(st, prog, PIPE_SHADER_GEOMETRY);
}
-const struct st_tracked_state st_bind_gs_atomics = {
- bind_gs_atomics
-};
-
-static void
-bind_tcs_atomics(struct st_context *st)
+void
+st_bind_tcs_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
st_bind_atomics(st, prog, PIPE_SHADER_TESS_CTRL);
}
-const struct st_tracked_state st_bind_tcs_atomics = {
- bind_tcs_atomics
-};
-
-static void
-bind_tes_atomics(struct st_context *st)
+void
+st_bind_tes_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
st_bind_atomics(st, prog, PIPE_SHADER_TESS_EVAL);
}
-const struct st_tracked_state st_bind_tes_atomics = {
- bind_tes_atomics
-};
-
-static void
-bind_cs_atomics(struct st_context *st)
+void
+st_bind_cs_atomics(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
st_bind_atomics(st, prog, PIPE_SHADER_COMPUTE);
}
-
-const struct st_tracked_state st_bind_cs_atomics = {
- bind_cs_atomics
-};
return GL_FALSE;
}
-static void
-update_blend( struct st_context *st )
+void
+st_update_blend( struct st_context *st )
{
struct pipe_blend_state *blend = &st->state.blend;
const struct gl_context *ctx = st->ctx;
cso_set_blend_color(st->cso_context, &bc);
}
}
-
-
-const struct st_tracked_state st_update_blend = {
- update_blend, /* update */
-};
/* Second state atom for user clip planes:
*/
-static void update_clip( struct st_context *st )
+void st_update_clip( struct st_context *st )
{
struct pipe_clip_state clip;
const struct gl_context *ctx = st->ctx;
st->pipe->set_clip_state(st->pipe, &clip);
}
}
-
-
-const struct st_tracked_state st_update_clip = {
- update_clip /* update */
-};
/**
* Vertex shader:
*/
-static void update_vs_constants(struct st_context *st )
+void st_update_vs_constants(struct st_context *st )
{
struct st_vertex_program *vp = st->vp;
struct gl_program_parameter_list *params = vp->Base.Parameters;
st_upload_constants( st, params, MESA_SHADER_VERTEX );
}
-
-const struct st_tracked_state st_update_vs_constants = {
- update_vs_constants /* update */
-};
-
-
-
/**
* Fragment shader:
*/
-static void update_fs_constants(struct st_context *st )
+void st_update_fs_constants(struct st_context *st )
{
struct st_fragment_program *fp = st->fp;
struct gl_program_parameter_list *params = fp->Base.Parameters;
}
-const struct st_tracked_state st_update_fs_constants = {
- update_fs_constants /* update */
-};
-
/* Geometry shader:
*/
-static void update_gs_constants(struct st_context *st )
+void st_update_gs_constants(struct st_context *st )
{
struct st_geometry_program *gp = st->gp;
struct gl_program_parameter_list *params;
}
}
-const struct st_tracked_state st_update_gs_constants = {
- update_gs_constants /* update */
-};
-
/* Tessellation control shader:
*/
-static void update_tcs_constants(struct st_context *st )
+void st_update_tcs_constants(struct st_context *st )
{
struct st_tessctrl_program *tcp = st->tcp;
struct gl_program_parameter_list *params;
}
}
-const struct st_tracked_state st_update_tcs_constants = {
- update_tcs_constants /* update */
-};
-
/* Tessellation evaluation shader:
*/
-static void update_tes_constants(struct st_context *st )
+void st_update_tes_constants(struct st_context *st )
{
struct st_tesseval_program *tep = st->tep;
struct gl_program_parameter_list *params;
}
}
-const struct st_tracked_state st_update_tes_constants = {
- update_tes_constants /* update */
-};
-
/* Compute shader:
*/
-static void update_cs_constants(struct st_context *st )
+void st_update_cs_constants(struct st_context *st )
{
struct st_compute_program *cp = st->cp;
struct gl_program_parameter_list *params;
}
}
-const struct st_tracked_state st_update_cs_constants = {
- update_cs_constants /* update */
-};
-
static void st_bind_ubos(struct st_context *st, struct gl_program *prog,
unsigned shader_type)
{
}
}
-static void bind_vs_ubos(struct st_context *st)
+void st_bind_vs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
st_bind_ubos(st, prog, PIPE_SHADER_VERTEX);
}
-const struct st_tracked_state st_bind_vs_ubos = {
- bind_vs_ubos
-};
-
-static void bind_fs_ubos(struct st_context *st)
+void st_bind_fs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
st_bind_ubos(st, prog, PIPE_SHADER_FRAGMENT);
}
-const struct st_tracked_state st_bind_fs_ubos = {
- bind_fs_ubos
-};
-
-static void bind_gs_ubos(struct st_context *st)
+void st_bind_gs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_ubos(st, prog, PIPE_SHADER_GEOMETRY);
}
-const struct st_tracked_state st_bind_gs_ubos = {
- bind_gs_ubos
-};
-
-static void bind_tcs_ubos(struct st_context *st)
+void st_bind_tcs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
st_bind_ubos(st, prog, PIPE_SHADER_TESS_CTRL);
}
-const struct st_tracked_state st_bind_tcs_ubos = {
- bind_tcs_ubos
-};
-
-static void bind_tes_ubos(struct st_context *st)
+void st_bind_tes_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
st_bind_ubos(st, prog, PIPE_SHADER_TESS_EVAL);
}
-const struct st_tracked_state st_bind_tes_ubos = {
- bind_tes_ubos
-};
-
-static void bind_cs_ubos(struct st_context *st)
+void st_bind_cs_ubos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
st_bind_ubos(st, prog, PIPE_SHADER_COMPUTE);
}
-
-const struct st_tracked_state st_bind_cs_ubos = {
- bind_cs_ubos
-};
}
}
-static void
-update_depth_stencil_alpha(struct st_context *st)
+void
+st_update_depth_stencil_alpha(struct st_context *st)
{
struct pipe_depth_stencil_alpha_state *dsa = &st->state.depth_stencil;
struct pipe_stencil_ref sr;
cso_set_depth_stencil_alpha(st->cso_context, dsa);
cso_set_stencil_ref(st->cso_context, &sr);
}
-
-
-const struct st_tracked_state st_update_depth_stencil_alpha = {
- update_depth_stencil_alpha /* update */
-};
/**
* Update framebuffer state (color, depth, stencil, etc. buffers)
*/
-static void
-update_framebuffer_state( struct st_context *st )
+void
+st_update_framebuffer_state( struct st_context *st )
{
struct pipe_framebuffer_state *framebuffer = &st->state.framebuffer;
struct gl_framebuffer *fb = st->ctx->DrawBuffer;
cso_set_framebuffer(st->cso_context, framebuffer);
}
-
-
-const struct st_tracked_state st_update_framebuffer = {
- update_framebuffer_state /* update */
-};
-
c->MaxImageUniforms - prog->info.num_images, NULL);
}
-static void bind_vs_images(struct st_context *st)
+void st_bind_vs_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
st_bind_images(st, prog, PIPE_SHADER_VERTEX);
}
-const struct st_tracked_state st_bind_vs_images = {
- bind_vs_images
-};
-
-static void bind_fs_images(struct st_context *st)
+void st_bind_fs_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
st_bind_images(st, prog, PIPE_SHADER_FRAGMENT);
}
-const struct st_tracked_state st_bind_fs_images = {
- bind_fs_images
-};
-
-static void bind_gs_images(struct st_context *st)
+void st_bind_gs_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_images(st, prog, PIPE_SHADER_GEOMETRY);
}
-const struct st_tracked_state st_bind_gs_images = {
- bind_gs_images
-};
-
-static void bind_tcs_images(struct st_context *st)
+void st_bind_tcs_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
st_bind_images(st, prog, PIPE_SHADER_TESS_CTRL);
}
-const struct st_tracked_state st_bind_tcs_images = {
- bind_tcs_images
-};
-
-static void bind_tes_images(struct st_context *st)
+void st_bind_tes_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
st_bind_images(st, prog, PIPE_SHADER_TESS_EVAL);
}
-const struct st_tracked_state st_bind_tes_images = {
- bind_tes_images
-};
-
-static void bind_cs_images(struct st_context *st)
+void st_bind_cs_images(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
st_bind_images(st, prog, PIPE_SHADER_COMPUTE);
}
-
-const struct st_tracked_state st_bind_cs_images = {
- bind_cs_images
-};
ST_STATE(ST_NEW_WINDOW_RECTANGLES, st_update_window_rectangles)
ST_STATE(ST_NEW_BLEND, st_update_blend)
-ST_STATE(ST_NEW_VS_SAMPLER_VIEWS, st_update_vertex_texture)
-ST_STATE(ST_NEW_FS_SAMPLER_VIEWS, st_update_fragment_texture)
-ST_STATE(ST_NEW_GS_SAMPLER_VIEWS, st_update_geometry_texture)
-ST_STATE(ST_NEW_TCS_SAMPLER_VIEWS, st_update_tessctrl_texture)
-ST_STATE(ST_NEW_TES_SAMPLER_VIEWS, st_update_tesseval_texture)
+ST_STATE(ST_NEW_VS_SAMPLER_VIEWS, st_update_vertex_textures)
+ST_STATE(ST_NEW_FS_SAMPLER_VIEWS, st_update_fragment_textures)
+ST_STATE(ST_NEW_GS_SAMPLER_VIEWS, st_update_geometry_textures)
+ST_STATE(ST_NEW_TCS_SAMPLER_VIEWS, st_update_tessctrl_textures)
+ST_STATE(ST_NEW_TES_SAMPLER_VIEWS, st_update_tesseval_textures)
/* Non-compute samplers. */
-ST_STATE(ST_NEW_VS_SAMPLERS, st_update_vertex_sampler) /* depends on update_*_texture for swizzle */
-ST_STATE(ST_NEW_TCS_SAMPLERS, st_update_tessctrl_sampler) /* depends on update_*_texture for swizzle */
-ST_STATE(ST_NEW_TES_SAMPLERS, st_update_tesseval_sampler) /* depends on update_*_texture for swizzle */
-ST_STATE(ST_NEW_GS_SAMPLERS, st_update_geometry_sampler) /* depends on update_*_texture for swizzle */
-ST_STATE(ST_NEW_FS_SAMPLERS, st_update_fragment_sampler) /* depends on update_*_texture for swizzle */
+ST_STATE(ST_NEW_VS_SAMPLERS, st_update_vertex_samplers) /* depends on update_*_texture for swizzle */
+ST_STATE(ST_NEW_TCS_SAMPLERS, st_update_tessctrl_samplers) /* depends on update_*_texture for swizzle */
+ST_STATE(ST_NEW_TES_SAMPLERS, st_update_tesseval_samplers) /* depends on update_*_texture for swizzle */
+ST_STATE(ST_NEW_GS_SAMPLERS, st_update_geometry_samplers) /* depends on update_*_texture for swizzle */
+ST_STATE(ST_NEW_FS_SAMPLERS, st_update_fragment_samplers) /* depends on update_*_texture for swizzle */
ST_STATE(ST_NEW_VS_IMAGES, st_bind_vs_images)
ST_STATE(ST_NEW_TCS_IMAGES, st_bind_tcs_images)
ST_STATE(ST_NEW_GS_IMAGES, st_bind_gs_images)
ST_STATE(ST_NEW_FS_IMAGES, st_bind_fs_images)
-ST_STATE(ST_NEW_FB_STATE, st_update_framebuffer) /* depends on update_*_texture and bind_*_images */
-ST_STATE(ST_NEW_SAMPLE_MASK, st_update_msaa)
+ST_STATE(ST_NEW_FB_STATE, st_update_framebuffer_state) /* depends on update_*_texture and bind_*_images */
+ST_STATE(ST_NEW_SAMPLE_MASK, st_update_sample_mask)
ST_STATE(ST_NEW_SAMPLE_SHADING, st_update_sample_shading)
ST_STATE(ST_NEW_VS_CONSTANTS, st_update_vs_constants)
/* Compute states must be last. */
ST_STATE(ST_NEW_CS_STATE, st_update_cp)
-ST_STATE(ST_NEW_CS_SAMPLER_VIEWS, st_update_compute_texture)
-ST_STATE(ST_NEW_CS_SAMPLERS, st_update_compute_sampler) /* depends on update_compute_texture for swizzle */
+ST_STATE(ST_NEW_CS_SAMPLER_VIEWS, st_update_compute_textures)
+ST_STATE(ST_NEW_CS_SAMPLERS, st_update_compute_samplers) /* depends on update_compute_texture for swizzle */
ST_STATE(ST_NEW_CS_CONSTANTS, st_update_cs_constants)
ST_STATE(ST_NEW_CS_UBOS, st_bind_cs_ubos)
ST_STATE(ST_NEW_CS_ATOMICS, st_bind_cs_atomics)
/* Update the sample mask for MSAA.
*/
-static void update_sample_mask( struct st_context *st )
+void st_update_sample_mask( struct st_context *st )
{
unsigned sample_mask = 0xffffffff;
struct pipe_framebuffer_state *framebuffer = &st->state.framebuffer;
}
}
-static void update_sample_shading( struct st_context *st )
+void st_update_sample_shading( struct st_context *st )
{
if (!st->fp)
return;
st->cso_context,
_mesa_get_min_invocations_per_fragment(st->ctx, &st->fp->Base, false));
}
-
-const struct st_tracked_state st_update_msaa = {
- update_sample_mask /* update */
-};
-
-const struct st_tracked_state st_update_sample_shading = {
- update_sample_shading /* update */
-};
/**
* Upload the pixel transfer color map texture.
*/
-static void
-update_pixel_transfer(struct st_context *st)
+void
+st_update_pixel_transfer(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
load_color_map_texture(ctx, st->pixel_xfer.pixelmap_texture);
}
}
-
-
-const struct st_tracked_state st_update_pixel_transfer = {
- update_pixel_transfer /* update */
-};
-static void update_raster_state( struct st_context *st )
+void st_update_rasterizer( struct st_context *st )
{
struct gl_context *ctx = st->ctx;
struct pipe_rasterizer_state *raster = &st->state.rasterizer;
cso_set_rasterizer(st->cso_context, raster);
}
-
-const struct st_tracked_state st_update_rasterizer = {
- update_raster_state /* update function */
-};
}
-static void
-update_vertex_samplers(struct st_context *st)
+void
+st_update_vertex_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_tessctrl_samplers(struct st_context *st)
+void
+st_update_tessctrl_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_tesseval_samplers(struct st_context *st)
+void
+st_update_tesseval_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_geometry_samplers(struct st_context *st)
+void
+st_update_geometry_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_fragment_samplers(struct st_context *st)
+void
+st_update_fragment_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_compute_samplers(struct st_context *st)
+void
+st_update_compute_samplers(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
&st->state.num_samplers[PIPE_SHADER_COMPUTE]);
}
}
-
-
-const struct st_tracked_state st_update_vertex_sampler = {
- update_vertex_samplers /* update */
-};
-
-const struct st_tracked_state st_update_tessctrl_sampler = {
- update_tessctrl_samplers /* update */
-};
-
-const struct st_tracked_state st_update_tesseval_sampler = {
- update_tesseval_samplers /* update */
-};
-
-const struct st_tracked_state st_update_geometry_sampler = {
- update_geometry_samplers /* update */
-};
-
-const struct st_tracked_state st_update_fragment_sampler = {
- update_fragment_samplers /* update */
-};
-
-const struct st_tracked_state st_update_compute_sampler = {
- update_compute_samplers /* update */
-};
/**
* Scissor depends on the scissor box, and the framebuffer dimensions.
*/
-static void
-update_scissor( struct st_context *st )
+void
+st_update_scissor( struct st_context *st )
{
struct pipe_scissor_state scissor[PIPE_MAX_VIEWPORTS];
const struct gl_context *ctx = st->ctx;
st->pipe->set_scissor_states(st->pipe, 0, ctx->Const.MaxViewports, scissor); /* activate */
}
-static void
-update_window_rectangles(struct st_context *st)
+void
+st_update_window_rectangles(struct st_context *st)
{
struct pipe_scissor_state new_rects[PIPE_MAX_WINDOW_RECTANGLES];
const struct gl_context *ctx = st->ctx;
st->pipe->set_window_rectangles(
st->pipe, include, num_rects, new_rects);
}
-
-const struct st_tracked_state st_update_scissor = {
- update_scissor /* update */
-};
-
-const struct st_tracked_state st_update_window_rectangles = {
- update_window_rectangles /* update */
-};
* Update fragment program state/atom. This involves translating the
* Mesa fragment program into a gallium fragment program and binding it.
*/
-static void
-update_fp( struct st_context *st )
+void
+st_update_fp( struct st_context *st )
{
struct st_fragment_program *stfp;
struct st_fp_variant_key key;
}
-const struct st_tracked_state st_update_fp = {
- update_fp /* update */
-};
-
-
-
/**
* Update vertex program state/atom. This involves translating the
* Mesa vertex program into a gallium fragment program and binding it.
*/
-static void
-update_vp( struct st_context *st )
+void
+st_update_vp( struct st_context *st )
{
struct st_vertex_program *stvp;
struct st_vp_variant_key key;
}
-const struct st_tracked_state st_update_vp = {
- update_vp /* update */
-};
-
-
-
-static void
-update_gp( struct st_context *st )
+void
+st_update_gp( struct st_context *st )
{
struct st_geometry_program *stgp;
st->gp_variant->driver_shader);
}
-const struct st_tracked_state st_update_gp = {
- update_gp /* update */
-};
-
-
-static void
-update_tcp( struct st_context *st )
+void
+st_update_tcp( struct st_context *st )
{
struct st_tessctrl_program *sttcp;
st->tcp_variant->driver_shader);
}
-const struct st_tracked_state st_update_tcp = {
- update_tcp /* update */
-};
-
-
-static void
-update_tep( struct st_context *st )
+void
+st_update_tep( struct st_context *st )
{
struct st_tesseval_program *sttep;
st->tep_variant->driver_shader);
}
-const struct st_tracked_state st_update_tep = {
- update_tep /* update */
-};
-
-
-static void
-update_cp( struct st_context *st )
+void
+st_update_cp( struct st_context *st )
{
struct st_compute_program *stcp;
cso_set_compute_shader_handle(st->cso_context,
st->cp_variant->driver_shader);
}
-
-const struct st_tracked_state st_update_cp = {
- update_cp /* update */
-};
}
-
-static void
-update_stipple( struct st_context *st )
+/** Update the stipple when the pattern or window height changes */
+void
+st_update_polygon_stipple( struct st_context *st )
{
const struct gl_context *ctx = st->ctx;
const GLuint sz = sizeof(st->state.poly_stipple);
st->pipe->set_polygon_stipple(st->pipe, &newStipple);
}
}
-
-
-/** Update the stipple when the pattern or window height changes */
-const struct st_tracked_state st_update_polygon_stipple = {
- update_stipple /* update */
-};
NULL);
}
-static void bind_vs_ssbos(struct st_context *st)
+void st_bind_vs_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
st_bind_ssbos(st, prog, PIPE_SHADER_VERTEX);
}
-const struct st_tracked_state st_bind_vs_ssbos = {
- bind_vs_ssbos
-};
-
-static void bind_fs_ssbos(struct st_context *st)
+void st_bind_fs_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
st_bind_ssbos(st, prog, PIPE_SHADER_FRAGMENT);
}
-const struct st_tracked_state st_bind_fs_ssbos = {
- bind_fs_ssbos
-};
-
-static void bind_gs_ssbos(struct st_context *st)
+void st_bind_gs_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
st_bind_ssbos(st, prog, PIPE_SHADER_GEOMETRY);
}
-const struct st_tracked_state st_bind_gs_ssbos = {
- bind_gs_ssbos
-};
-
-static void bind_tcs_ssbos(struct st_context *st)
+void st_bind_tcs_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_CTRL];
st_bind_ssbos(st, prog, PIPE_SHADER_TESS_CTRL);
}
-const struct st_tracked_state st_bind_tcs_ssbos = {
- bind_tcs_ssbos
-};
-
-static void bind_tes_ssbos(struct st_context *st)
+void st_bind_tes_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
st_bind_ssbos(st, prog, PIPE_SHADER_TESS_EVAL);
}
-const struct st_tracked_state st_bind_tes_ssbos = {
- bind_tes_ssbos
-};
-
-static void bind_cs_ssbos(struct st_context *st)
+void st_bind_cs_ssbos(struct st_context *st)
{
struct gl_program *prog =
st->ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
st_bind_ssbos(st, prog, PIPE_SHADER_COMPUTE);
}
-
-const struct st_tracked_state st_bind_cs_ssbos = {
- bind_cs_ssbos
-};
#include "st_atom.h"
-static void
-update_tess(struct st_context *st)
+void
+st_update_tess(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
struct pipe_context *pipe = st->pipe;
ctx->TessCtrlProgram.patch_default_outer_level,
ctx->TessCtrlProgram.patch_default_inner_level);
}
-
-
-const struct st_tracked_state st_update_tess = {
- update_tess /* update */
-};
-static void
-update_vertex_textures(struct st_context *st)
+void
+st_update_vertex_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_fragment_textures(struct st_context *st)
+void
+st_update_fragment_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_geometry_textures(struct st_context *st)
+void
+st_update_geometry_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_tessctrl_textures(struct st_context *st)
+void
+st_update_tessctrl_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_tesseval_textures(struct st_context *st)
+void
+st_update_tesseval_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
}
-static void
-update_compute_textures(struct st_context *st)
+void
+st_update_compute_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
&st->state.num_sampler_views[PIPE_SHADER_COMPUTE]);
}
}
-
-
-const struct st_tracked_state st_update_fragment_texture = {
- update_fragment_textures /* update */
-};
-
-
-const struct st_tracked_state st_update_vertex_texture = {
- update_vertex_textures /* update */
-};
-
-
-const struct st_tracked_state st_update_geometry_texture = {
- update_geometry_textures /* update */
-};
-
-
-const struct st_tracked_state st_update_tessctrl_texture = {
- update_tessctrl_textures /* update */
-};
-
-
-const struct st_tracked_state st_update_tesseval_texture = {
- update_tesseval_textures /* update */
-};
-
-
-const struct st_tracked_state st_update_compute_texture = {
- update_compute_textures /* update */
-};
* - depthrange
* - window pos/size or FBO size
*/
-static void
-update_viewport( struct st_context *st )
+void
+st_update_viewport( struct st_context *st )
{
struct gl_context *ctx = st->ctx;
GLfloat yScale, yBias;
if (ctx->Const.MaxViewports > 1)
st->pipe->set_viewport_states(st->pipe, 1, ctx->Const.MaxViewports - 1, &st->state.viewport[1]);
}
-
-
-const struct st_tracked_state st_update_viewport = {
- update_viewport /* update */
-};