+ struct radeon_state rasterizer;
+ struct radeon_state scissor;
+ struct radeon_state dsa;
+ struct radeon_state cb_cntl;
+
+ struct radeon_state db_flush;
+ struct radeon_state cb_flush;
+};
+
+#define R600_MAX_CONSTANT 256 /* magic */
+#define R600_MAX_RESOURCE 160 /* magic */
+
+struct r600_shader_sampler_states {
+ unsigned nsampler;
+ unsigned nview;
+ unsigned nborder;
+ struct radeon_state *sampler[PIPE_MAX_ATTRIBS];
+ struct radeon_state *view[PIPE_MAX_ATTRIBS];
+ struct radeon_state *border[PIPE_MAX_ATTRIBS];
+};
+
+struct r600_context;
+struct r600_screen;
+struct r600_resource;
+struct r600_resource_texture;
+
+struct r600_context_hw_state_vtbl {
+ void (*blend)(struct r600_context *rctx,
+ struct radeon_state *rstate,
+ const struct pipe_blend_state *state);
+ void (*ucp)(struct r600_context *rctx, struct radeon_state *rstate,
+ const struct pipe_clip_state *state);
+ void (*cb)(struct r600_context *rctx, struct radeon_state *rstate,
+ const struct pipe_framebuffer_state *state, int cb);
+ void (*db)(struct r600_context *rctx, struct radeon_state *rstate,
+ const struct pipe_framebuffer_state *state);
+ void (*rasterizer)(struct r600_context *rctx, struct radeon_state *rstate);
+ void (*scissor)(struct r600_context *rctx, struct radeon_state *rstate);
+ void (*viewport)(struct r600_context *rctx, struct radeon_state *rstate, const struct pipe_viewport_state *state);
+ void (*dsa)(struct r600_context *rctx, struct radeon_state *rstate);
+ void (*sampler_border)(struct r600_context *rctx, struct radeon_state *rstate,
+ const struct pipe_sampler_state *state, unsigned id);
+ void (*sampler)(struct r600_context *rctx, struct radeon_state *rstate,
+ const struct pipe_sampler_state *state, unsigned id);
+ void (*resource)(struct pipe_context *ctx, struct radeon_state *rstate,
+ const struct pipe_sampler_view *view, unsigned id);
+ void (*cb_cntl)(struct r600_context *rctx, struct radeon_state *rstate);
+ int (*vs_resource)(struct r600_context *rctx, int id, struct r600_resource *rbuffer, uint32_t offset,
+ uint32_t stride, uint32_t format);
+ int (*vgt_init)(struct r600_draw *draw,
+ int vgt_draw_initiator);
+ int (*vgt_prim)(struct r600_draw *draw,
+ uint32_t prim, uint32_t vgt_dma_index_type);
+
+ int (*ps_shader)(struct r600_context *rctx, struct r600_context_state *rshader,
+ struct radeon_state *state);
+ int (*vs_shader)(struct r600_context *rctx, struct r600_context_state *rpshader,
+ struct radeon_state *state);
+ void (*init_config)(struct r600_context *rctx);