mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
zink: flatten out params to nir_to_spirv()
no functional changes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39359>
This commit is contained in:
parent
0c22a039e2
commit
0b54463485
3 changed files with 5 additions and 6 deletions
|
|
@ -4756,9 +4756,8 @@ get_spacing(enum gl_tess_spacing spacing)
|
|||
}
|
||||
|
||||
struct spirv_shader *
|
||||
nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, const struct zink_screen *screen)
|
||||
nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, uint32_t spirv_version, bool has_demote_to_helper)
|
||||
{
|
||||
const uint32_t spirv_version = screen->spirv_version;
|
||||
struct spirv_shader *ret = NULL;
|
||||
|
||||
struct ntv_context ctx = {0};
|
||||
|
|
@ -4786,14 +4785,14 @@ nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, const s
|
|||
if (s->info.fs.uses_sample_shading)
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilitySampleRateShading);
|
||||
|
||||
if (s->info.fs.uses_discard && screen->info.have_EXT_shader_demote_to_helper_invocation) {
|
||||
if (s->info.fs.uses_discard && has_demote_to_helper) {
|
||||
if (!ctx.have_spirv16)
|
||||
spirv_builder_emit_extension(&ctx.builder, "SPV_EXT_demote_to_helper_invocation");
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityDemoteToHelperInvocation);
|
||||
}
|
||||
|
||||
if (BITSET_TEST(s->info.system_values_read, SYSTEM_VALUE_HELPER_INVOCATION) &&
|
||||
screen->info.have_EXT_shader_demote_to_helper_invocation && !ctx.have_spirv16) {
|
||||
has_demote_to_helper && !ctx.have_spirv16) {
|
||||
spirv_builder_emit_extension(&ctx.builder, "SPV_EXT_demote_to_helper_invocation");
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityDemoteToHelperInvocation);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct pipe_stream_output_info;
|
|||
|
||||
struct spirv_shader *
|
||||
nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *so_info,
|
||||
const struct zink_screen *screen);
|
||||
uint32_t spirv_version, bool has_demote_to_helper);
|
||||
|
||||
void
|
||||
spirv_shader_delete(struct spirv_shader *s);
|
||||
|
|
|
|||
|
|
@ -3860,7 +3860,7 @@ compile_module(struct zink_screen *screen, struct zink_shader *zs, nir_shader *n
|
|||
}
|
||||
|
||||
struct zink_shader_object obj = {0};
|
||||
struct spirv_shader *spirv = nir_to_spirv(nir, sinfo, screen);
|
||||
struct spirv_shader *spirv = nir_to_spirv(nir, sinfo, screen->spirv_version, screen->info.have_EXT_shader_demote_to_helper_invocation);
|
||||
if (spirv)
|
||||
obj = zink_shader_spirv_compile(screen, zs, spirv, can_shobj, pg);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue