shader->info.EarlyFragmentTests = state->fs_early_fragment_tests;
shader->info.InnerCoverage = state->fs_inner_coverage;
shader->info.PostDepthCoverage = state->fs_post_depth_coverage;
- shader->info.BlendSupport = state->fs_blend_support;
+ shader->BlendSupport = state->fs_blend_support;
break;
default:
linked_shader->info.uses_gl_fragcoord = false;
linked_shader->info.origin_upper_left = false;
linked_shader->info.pixel_center_integer = false;
- linked_shader->info.BlendSupport = 0;
if (linked_shader->Stage != MESA_SHADER_FRAGMENT ||
(prog->data->Version < 150 &&
linked_shader->Program->info.fs.post_depth_coverage |=
shader->info.PostDepthCoverage;
- linked_shader->info.BlendSupport |= shader->info.BlendSupport;
+ linked_shader->Program->sh.fs.BlendSupport |= shader->BlendSupport;
}
}
bool
lower_blend_equation_advanced(struct gl_linked_shader *sh)
{
- if (sh->info.BlendSupport == 0)
+ if (sh->Program->sh.fs.BlendSupport == 0)
return false;
/* Lower early returns in main() so there's a single exit point
ir_factory f(&main->body, mem_ctx);
ir_variable *result_dest =
- calc_blend_result(f, mode, fb, blend_source, sh->info.BlendSupport);
+ calc_blend_result(f, mode, fb, blend_source,
+ sh->Program->sh.fs.BlendSupport);
/* Copy the result back to the original values. It would be simpler
* to demote the program's output variables, and create a new vec4
const struct gl_shader_program *sh_prog =
ctx->_Shader->_CurrentFragmentProgram;
const GLbitfield blend_support = !sh_prog ? 0 :
- sh_prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->info.BlendSupport;
+ sh_prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->sh.fs.BlendSupport;
if ((blend_support & ctx->Color._AdvancedBlendMode) == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION,
GLuint NumSubroutineFunctions;
GLuint MaxSubroutineFunctionIndex;
struct gl_subroutine_function *SubroutineFunctions;
+
+ union {
+ struct {
+ /**
+ * A bitmask of gl_advanced_blend_mode values
+ */
+ GLbitfield BlendSupport;
+ } fs;
+ };
} sh;
/** ARB assembly-style program fields */
*/
bool EarlyFragmentTests;
- /**
- * A bitmask of gl_advanced_blend_mode values
- */
- GLbitfield BlendSupport;
-
/**
* Compute shader state from ARB_compute_shader and
* ARB_compute_variable_group_size layout qualifiers.
struct exec_list *ir;
struct glsl_symbol_table *symbols;
+ /**
+ * A bitmask of gl_advanced_blend_mode values
+ */
+ GLbitfield BlendSupport;
+
struct gl_shader_info info;
};