Revert "zink: fill in params for fs shader keys and flag shader for rebuild"

This reverts commit 9aa08221fa.

Fixes: 9aa08221fa ("zink: fill in params for fs shader keys and flag shader for rebuild")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7754>
This commit is contained in:
Erik Faye-Lund 2020-11-24 18:20:38 +01:00 committed by Marge Bot
parent 1a25b1b36e
commit a4d03aa2b1
3 changed files with 1 additions and 13 deletions

View File

@ -769,11 +769,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
zink_framebuffer_reference(screen, &ctx->framebuffer, fb);
zink_render_pass_reference(screen, &ctx->gfx_pipeline_state.render_pass, fb->rp);
uint8_t rast_samples = util_framebuffer_get_num_samples(state);
/* in vulkan, gl_SampleMask needs to be explicitly ignored for sampleCount == 1 */
if ((ctx->gfx_pipeline_state.rast_samples > 1) != (rast_samples > 1))
ctx->dirty_shader_stages |= 1 << PIPE_SHADER_FRAGMENT;
ctx->gfx_pipeline_state.rast_samples = rast_samples;
ctx->gfx_pipeline_state.rast_samples = util_framebuffer_get_num_samples(state);
ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs;
ctx->gfx_pipeline_state.hash = 0;

View File

@ -180,13 +180,6 @@ shader_key_fs_gen(struct zink_context *ctx, struct zink_shader *zs, struct zink_
fs_key->shader_id = zs->shader_id;
//fs_key->flat_shade = ctx->rast_state->base.flatshade;
/* if gl_SampleMask[] is written to, we have to ensure that we get a shader with the same sample count:
* in GL, rast_samples==1 means ignore gl_SampleMask[]
* in VK, gl_SampleMask[] is never ignored
*/
if (zs->nir->info.outputs_written & (1 << FRAG_RESULT_SAMPLE_MASK))
fs_key->samples = !!ctx->fb_state.samples;
}
typedef void (*zink_shader_key_gen)(struct zink_context *ctx, struct zink_shader *zs, struct zink_shader_key *key);

View File

@ -29,7 +29,6 @@
struct zink_fs_key {
unsigned shader_id;
//bool flat_shade;
bool samples;
};
/* a shader key is used for swapping out shader modules based on pipeline states,