diff options
author | Marek Olšák <[email protected]> | 2012-02-26 13:17:53 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-03-05 14:22:19 +0100 |
commit | aacd653834264b70a2537aff7914762b39f0683f (patch) | |
tree | 86e47810dadf569771f950b72051a494431349be /src/gallium/drivers/r600/r600_pipe.h | |
parent | 2881d456a5dd267bf2291532c9d95b1d48e93c08 (diff) |
r600g: rework scissor for r600-r700
We must use VPORT_SCISSOR, because that's the only one we can use for multiple
scissor rectangles in ARB_viewport_array.
R700 can use the VPORT_SCISSOR_ENABLE bit, but R600 doesn't have that and must
emit a 8192x8192 rectangle if scissor is disabled.
This commit also cleanups magic numbers in create_rs_state.
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 62d831086fc..9550e9e0bae 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -152,6 +152,7 @@ struct r600_pipe_rasterizer { unsigned pa_cl_clip_cntl; float offset_units; float offset_scale; + bool scissor_enable; }; struct r600_pipe_blend { @@ -336,6 +337,11 @@ struct r600_context { struct r600_so_target *so_targets[PIPE_MAX_SO_BUFFERS]; boolean streamout_start; unsigned streamout_append_bitmask; + + /* There is no scissor enable bit on r6xx, so we must use a workaround. + * These track the current scissor state. */ + bool scissor_enable; + struct pipe_scissor_state scissor_state; }; static INLINE void r600_emit_atom(struct r600_context *rctx, struct r600_atom *atom) @@ -420,6 +426,8 @@ int r600_find_vs_semantic_index(struct r600_shader *vs, struct r600_shader *ps, int id); /* r600_state.c */ +void r600_set_scissor_state(struct r600_context *rctx, + const struct pipe_scissor_state *state); void r600_update_sampler_states(struct r600_context *rctx); void r600_init_state_functions(struct r600_context *rctx); void r600_init_atom_start_cs(struct r600_context *rctx); @@ -474,6 +482,7 @@ void r600_bind_blend_state(struct pipe_context *ctx, void *state); void r600_set_blend_color(struct pipe_context *ctx, const struct pipe_blend_color *state); void r600_bind_dsa_state(struct pipe_context *ctx, void *state); +void r600_set_max_scissor(struct r600_context *rctx); void r600_bind_rs_state(struct pipe_context *ctx, void *state); void r600_delete_rs_state(struct pipe_context *ctx, void *state); void r600_sampler_view_destroy(struct pipe_context *ctx, |