diff options
author | Miklós Máté <[email protected]> | 2017-12-02 23:35:21 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-12-25 14:32:23 +0100 |
commit | a64d6fb7308e0ce79e0f1b8e9b7cda6403be1eb6 (patch) | |
tree | a2a0af89214a9a7b0fb9d89cfebaebb9169cec2d /src/mesa/main/state.h | |
parent | 759d193ceb1823d3da6dd399f3934186e6c2ebae (diff) |
mesa: fix not having secondary color in ATI_fs in swrast
ATI_fs in swrast only had secondary color if GL_COLOR_SUM was enabled.
This patch probably fixes the same issue in r200.
Piglit: spec/ati_fragment_shader/render-sources and render-precedence
Signed-off-by: Miklós Máté <[email protected]>
Diffstat (limited to 'src/mesa/main/state.h')
-rw-r--r-- | src/mesa/main/state.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h index 9d4591790ae..5814c659a31 100644 --- a/src/mesa/main/state.h +++ b/src/mesa/main/state.h @@ -46,6 +46,13 @@ extern void _mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); +static inline bool +_mesa_ati_fragment_shader_enabled(const struct gl_context *ctx) +{ + return ctx->ATIFragmentShader.Enabled && + ctx->ATIFragmentShader.Current->Instructions[0]; +} + /** * Is the secondary color needed? */ @@ -69,6 +76,9 @@ _mesa_need_secondary_color(const struct gl_context *ctx) (ctx->FragmentProgram._Current->info.inputs_read & VARYING_BIT_COL1)) return GL_TRUE; + if (_mesa_ati_fragment_shader_enabled(ctx)) + return GL_TRUE; + return GL_FALSE; } @@ -107,11 +117,4 @@ _mesa_arb_fragment_program_enabled(const struct gl_context *ctx) ctx->FragmentProgram.Current->arb.Instructions; } -static inline bool -_mesa_ati_fragment_shader_enabled(const struct gl_context *ctx) -{ - return ctx->ATIFragmentShader.Enabled && - ctx->ATIFragmentShader.Current->Instructions[0]; -} - #endif |