diff options
author | Marek Olšák <[email protected]> | 2014-04-20 15:19:43 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-25 01:33:12 +0200 |
commit | ecc8a37ec5be7fca79205f08666fb76474ab5c0d (patch) | |
tree | 1f30e44764ba76d917743c0844d616b2560c8bb6 /src/gallium/drivers/r600/r600_pipe.h | |
parent | ef162cf13df96b2c8ab36001b8dab5640cabf05f (diff) |
r600g: fix for broken CULL_FRONT behavior on R6xx
Cc: [email protected]
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index f31fa45acb0..952b6bded8d 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -41,7 +41,7 @@ /* the number of CS dwords for flushing and drawing */ #define R600_MAX_FLUSH_CS_DWORDS 16 -#define R600_MAX_DRAW_CS_DWORDS 34 +#define R600_MAX_DRAW_CS_DWORDS 37 #define R600_TRACE_CS_DWORDS 7 #define R600_MAX_USER_CONST_BUFFERS 13 @@ -234,6 +234,7 @@ struct r600_rasterizer_state { unsigned clip_plane_enable; unsigned pa_sc_line_stipple; unsigned pa_cl_clip_cntl; + unsigned pa_su_sc_mode_cntl; float offset_units; float offset_scale; bool offset_enable; @@ -852,4 +853,32 @@ static INLINE bool r600_can_read_depth(struct r600_texture *rtex) rtex->resource.b.b.format == PIPE_FORMAT_Z32_FLOAT); } +#define V_028A6C_OUTPRIM_TYPE_POINTLIST 0 +#define V_028A6C_OUTPRIM_TYPE_LINESTRIP 1 +#define V_028A6C_OUTPRIM_TYPE_TRISTRIP 2 + +static INLINE unsigned r600_conv_prim_to_gs_out(unsigned mode) +{ + static const int prim_conv[] = { + V_028A6C_OUTPRIM_TYPE_POINTLIST, + V_028A6C_OUTPRIM_TYPE_LINESTRIP, + V_028A6C_OUTPRIM_TYPE_LINESTRIP, + V_028A6C_OUTPRIM_TYPE_LINESTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_LINESTRIP, + V_028A6C_OUTPRIM_TYPE_LINESTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP, + V_028A6C_OUTPRIM_TYPE_TRISTRIP + }; + assert(mode < Elements(prim_conv)); + + return prim_conv[mode]; +} + #endif |