st/mesa: assert that all incoming shaders use lowered IO
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
This commit is contained in:
@@ -74,6 +74,8 @@ st_nir_finish_builtin_nir(struct st_context *st, nir_shader *nir)
|
||||
if (!screen->caps.nir_images_as_deref)
|
||||
NIR_PASS(_, nir, gl_nir_lower_images, false);
|
||||
|
||||
assert(nir->info.stage == MESA_SHADER_COMPUTE || nir->info.io_lowered);
|
||||
|
||||
if (nir->info.io_lowered &&
|
||||
!(nir->options->io_options & nir_io_has_intrinsics)) {
|
||||
NIR_PASS(_, nir, st_nir_unlower_io_to_vars);
|
||||
|
@@ -853,6 +853,9 @@ st_create_common_variant(struct st_context *st,
|
||||
key->is_draw_shader);
|
||||
}
|
||||
|
||||
assert(state.ir.nir->info.stage == MESA_SHADER_COMPUTE ||
|
||||
state.ir.nir->info.io_lowered);
|
||||
|
||||
/* This should be after all passes that touch IO. */
|
||||
if (state.ir.nir->info.io_lowered &&
|
||||
(!(state.ir.nir->options->io_options & nir_io_has_intrinsics) ||
|
||||
@@ -1245,6 +1248,8 @@ st_create_fp_variant(struct st_context *st,
|
||||
finalize = true;
|
||||
}
|
||||
|
||||
assert(state.ir.nir->info.io_lowered);
|
||||
|
||||
/* This should be after all passes that touch IO. */
|
||||
if (state.ir.nir->info.io_lowered &&
|
||||
!(state.ir.nir->options->io_options & nir_io_has_intrinsics)) {
|
||||
|
Reference in New Issue
Block a user