This key will be 1 when a multisampled buffer is used without
multisampling enabled. This requires a lowering pass.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22626>
zink_set_primitive_emulation_keys(ctx);
}
+ zink_update_fs_key_single_sample(ctx);
+
if (index_size) {
const VkIndexType index_type[3] = {
VK_INDEX_TYPE_UINT8_EXT,
ctx->gfx_stages[MESA_SHADER_GEOMETRY]->non_fs.is_generated)
ctx->base.bind_gs_state(&ctx->base, NULL);
}
+
+void
+zink_update_fs_key_single_sample(struct zink_context *ctx)
+{
+ bool single_sample = ctx->rast_state && !ctx->rast_state->base.multisample &&
+ ctx->gfx_pipeline_state.rast_samples != 0;
+ if (zink_get_fs_base_key(ctx)->single_sample != single_sample)
+ zink_set_fs_base_key(ctx)->single_sample = single_sample;
+}
zink_update_fs_key_samples(struct zink_context *ctx);
void
+zink_update_fs_key_single_sample(struct zink_context *ctx);
+
+void
zink_update_gs_key_rectangular_line(struct zink_context *ctx);
static inline struct zink_vs_key *
bool force_persample_interp : 1;
bool fbfetch_ms : 1;
bool shadow_needs_shader_swizzle : 1; //append zink_zs_swizzle_key after the key data
- uint8_t pad : 2;
+ bool single_sample: 1;
+ uint8_t pad : 1;
uint8_t coord_replace_bits;
};