diff options
author | Marek Olšák <[email protected]> | 2012-09-14 05:34:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-09-14 05:55:00 +0200 |
commit | 1e51d368eb5360378218217ff35731896f48512f (patch) | |
tree | 974a06b71793bd41ed9df43413e7e2db1c42a92b /src/gallium/drivers/r300/r300_context.h | |
parent | b33d7eaa5e77b5367584fe183c46f8c3d9a06760 (diff) |
r300g: fix colormask with non-BGRA formats
NOTE: This is a candidate for the stable branches.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 6a064420603..2c7b477685a 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -41,6 +41,16 @@ struct r300_fragment_shader; struct r300_vertex_shader; struct r300_stencilref_context; +enum colormask_swizzle { + COLORMASK_BGRA, + COLORMASK_RGBA, + COLORMASK_RRRR, + COLORMASK_AAAA, + COLORMASK_GRRG, + COLORMASK_ARRA, + COLORMASK_NUM_SWIZZLES +}; + struct r300_atom { /* Name, for debugging. */ const char* name; @@ -66,7 +76,7 @@ struct r300_aa_state { struct r300_blend_state { struct pipe_blend_state state; - uint32_t cb_clamp[8]; + uint32_t cb_clamp[COLORMASK_NUM_SWIZZLES][8]; uint32_t cb_noclamp[8]; uint32_t cb_no_readwrite[8]; }; @@ -320,6 +330,8 @@ struct r300_surface { /* Whether the CBZB clear is allowed on the surface. */ boolean cbzb_allowed; + + unsigned colormask_swizzle; }; struct r300_texture_desc { |