Cc: 17.1 17.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
memcpy(prog, ctx->_Shader->CurrentProgram, sizeof(prog));
- if (prog[MESA_SHADER_FRAGMENT] == NULL &&
- _mesa_arb_fragment_program_enabled(ctx)) {
- prog[MESA_SHADER_FRAGMENT] = ctx->FragmentProgram.Current;
+ if (prog[MESA_SHADER_FRAGMENT] == NULL) {
+ if (_mesa_arb_fragment_program_enabled(ctx))
+ prog[MESA_SHADER_FRAGMENT] = ctx->FragmentProgram.Current;
+ else if (_mesa_ati_fragment_shader_enabled(ctx))
+ prog[MESA_SHADER_FRAGMENT] = ctx->ATIFragmentShader.Current->Program;
}
/* TODO: only set this if there are actual changes */