vrend: move fbfetch coherency support from key to shader config

The property doesn't change. so it doesn't make sense to set it in the
shader key.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
macos/master
Gert Wollny 4 years ago
parent 08e11a4954
commit 28cfd570a2
  1. 2
      src/vrend_renderer.c
  2. 4
      src/vrend_shader.c
  3. 2
      src/vrend_shader.h

@ -3343,7 +3343,6 @@ static inline void vrend_fill_shader_key(struct vrend_sub_context *sub_ctx,
if (type == PIPE_SHADER_FRAGMENT && vrend_state.use_gles && can_emulate_logicop(sub_ctx->blend_state.logicop_func)) {
key->fs_logicop_enabled = sub_ctx->blend_state.logicop_enable;
key->fs_logicop_func = sub_ctx->blend_state.logicop_func;
key->fs_logicop_emulate_coherent = !has_feature(feat_framebuffer_fetch_non_coherent);
}
key->invert_fs_origin = !sub_ctx->inverted_fbo_content;
@ -6454,6 +6453,7 @@ struct vrend_context *vrend_create_context(int id, uint32_t nlen, const char *de
grctx->shader_cfg.has_conservative_depth = has_feature(feat_conservative_depth);
grctx->shader_cfg.use_integer = vrend_state.use_integer;
grctx->shader_cfg.has_dual_src_blend = has_feature(feat_dual_src_blend);
grctx->shader_cfg.has_fbfetch_coherent = has_feature(feat_framebuffer_fetch);
vrend_renderer_create_sub_ctx(grctx, 0);
vrend_renderer_set_sub_ctx(grctx, 0);

@ -5473,7 +5473,7 @@ static void emit_header(const struct dump_ctx *ctx, struct vrend_glsl_strbufs *g
}
if (logiop_require_inout(ctx->key)) {
if (ctx->key->fs_logicop_emulate_coherent)
if (ctx->cfg->has_fbfetch_coherent)
emit_ext(glsl_strbufs, "EXT_shader_framebuffer_fetch", "require");
else
emit_ext(glsl_strbufs, "EXT_shader_framebuffer_fetch_non_coherent", "require");
@ -6398,7 +6398,7 @@ static void emit_ios_fs(const struct dump_ctx *ctx,
emit_hdrf(glsl_strbufs, "%s fsout_tmp_c%d;\n", type, i);
if (logiop_require_inout(ctx->key)) {
const char *noncoherent = ctx->key->fs_logicop_emulate_coherent ? "" : ", noncoherent";
const char *noncoherent = ctx->cfg->has_fbfetch_coherent ? "" : ", noncoherent";
emit_hdrf(glsl_strbufs, "layout (location=%d%s) inout highp %s fsout_c%d;\n", i, noncoherent, type, i);
} else
emit_hdrf(glsl_strbufs, "layout (location=%d) out %s fsout_c%d;\n", i,

@ -132,7 +132,6 @@ struct vrend_shader_key {
bool flatshade;
bool guest_sent_io_arrays;
bool fs_logicop_enabled;
bool fs_logicop_emulate_coherent;
enum pipe_logicop fs_logicop_func;
uint8_t surface_component_bits[PIPE_MAX_COLOR_BUFS];
@ -171,6 +170,7 @@ struct vrend_shader_cfg {
bool has_conservative_depth;
bool use_integer;
bool has_dual_src_blend;
bool has_fbfetch_coherent;
};
struct vrend_context;

Loading…
Cancel
Save