shader: Move winsys_adjust_y_emitted from the shader key into the dump context

The value should never haven been part of the shader key.

Fixes #132

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 5 years ago
parent e15b6ac843
commit eca01605f2
  1. 1
      src/vrend_renderer.c
  2. 5
      src/vrend_shader.c
  3. 1
      src/vrend_shader.h

@ -3083,7 +3083,6 @@ static inline void vrend_fill_shader_key(struct vrend_context *ctx,
key->invert_fs_origin = !ctx->sub->inverted_fbo_content;
key->coord_replace = ctx->sub->rs_state.point_quad_rasterization ? ctx->sub->rs_state.sprite_coord_enable : 0;
key->winsys_adjust_y_emitted = false;
if (type == PIPE_SHADER_FRAGMENT)
key->fs_swizzle_output_rgb_to_bgr = ctx->sub->swizzle_output_rgb_to_bgr;

@ -248,6 +248,7 @@ struct dump_ctx {
bool early_depth_stencil;
bool has_file_memory;
bool force_color_two_side;
bool winsys_adjust_y_emitted;
int tcs_vertices_out;
int tes_prim_mode;
@ -6123,9 +6124,9 @@ static void emit_ios_fs(struct dump_ctx *ctx)
emit_ios_generic(ctx, io_in, prefixes, &ctx->inputs[i], "in", "");
}
if (ctx->cfg->use_gles && !ctx->key->winsys_adjust_y_emitted &&
if (ctx->cfg->use_gles && !ctx->winsys_adjust_y_emitted &&
(ctx->key->coord_replace & (1 << ctx->inputs[i].sid))) {
ctx->key->winsys_adjust_y_emitted = true;
ctx->winsys_adjust_y_emitted = true;
emit_hdr(ctx, "uniform float winsys_adjust_y;\n");
}
}

@ -95,7 +95,6 @@ struct vrend_shader_info {
struct vrend_shader_key {
uint32_t coord_replace;
bool winsys_adjust_y_emitted;
bool invert_fs_origin;
bool pstipple_tex;
bool add_alpha_test;

Loading…
Cancel
Save