diff options
author | Chia-I Wu <[email protected]> | 2010-12-04 11:23:41 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-12-04 13:20:38 +0800 |
commit | a19eaaa6c1956add5343295af7e9f682efa08d74 (patch) | |
tree | ca79287516d05c96ab4755fc905a03e857d83add /src/gallium/state_trackers/vega/shaders_cache.c | |
parent | 3b4c8886539b02653761f092a387c27b5c562496 (diff) |
st/vega: Move masking after blending.
Masking should happen after blending. The shader is not entirely
correct, but leave it as is for now.
Diffstat (limited to 'src/gallium/state_trackers/vega/shaders_cache.c')
-rw-r--r-- | src/gallium/state_trackers/vega/shaders_cache.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/vega/shaders_cache.c b/src/gallium/state_trackers/vega/shaders_cache.c index d1ebe7e6779..76bac5139f4 100644 --- a/src/gallium/state_trackers/vega/shaders_cache.c +++ b/src/gallium/state_trackers/vega/shaders_cache.c @@ -53,8 +53,8 @@ * 1) Paint generation (color/gradient/pattern) * 2) Image composition (normal/multiply/stencil) * 3) Color transform - * 4) Mask - * 5) Extended blend (multiply/screen/darken/lighten) + * 4) Extended blend (multiply/screen/darken/lighten) + * 5) Mask * 6) Premultiply/Unpremultiply * 7) Color transform (to black and white) */ @@ -301,10 +301,13 @@ create_shader(struct pipe_context *pipe, } /* fourth stage */ - sh = SHADERS_GET_MASK_SHADER(id); + sh = SHADERS_GET_BLEND_SHADER(id); switch (sh) { - case VEGA_MASK_SHADER: - shaders[idx] = &shaders_mask_asm[(sh >> SHADERS_MASK_SHIFT) - 1]; + case VEGA_BLEND_MULTIPLY_SHADER: + case VEGA_BLEND_SCREEN_SHADER: + case VEGA_BLEND_DARKEN_SHADER: + case VEGA_BLEND_LIGHTEN_SHADER: + shaders[idx] = &shaders_blend_asm[(sh >> SHADERS_BLEND_SHIFT) - 1]; assert(shaders[idx]->id == sh); idx++; break; @@ -313,13 +316,10 @@ create_shader(struct pipe_context *pipe, } /* fifth stage */ - sh = SHADERS_GET_BLEND_SHADER(id); + sh = SHADERS_GET_MASK_SHADER(id); switch (sh) { - case VEGA_BLEND_MULTIPLY_SHADER: - case VEGA_BLEND_SCREEN_SHADER: - case VEGA_BLEND_DARKEN_SHADER: - case VEGA_BLEND_LIGHTEN_SHADER: - shaders[idx] = &shaders_blend_asm[(sh >> SHADERS_BLEND_SHIFT) - 1]; + case VEGA_MASK_SHADER: + shaders[idx] = &shaders_mask_asm[(sh >> SHADERS_MASK_SHIFT) - 1]; assert(shaders[idx]->id == sh); idx++; break; |