mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
nir/tests: Improve shader creation
Sets some fields so they are not printed and allows specifying a stage. This decreases the size of reference shaders. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
This commit is contained in:
parent
305be9cf5e
commit
6d1d15183f
1 changed files with 9 additions and 1 deletions
|
|
@ -14,11 +14,19 @@
|
|||
class nir_test : public ::testing::Test {
|
||||
protected:
|
||||
nir_test(const char *name)
|
||||
: nir_test(name, MESA_SHADER_COMPUTE)
|
||||
{
|
||||
}
|
||||
|
||||
nir_test(const char *name, gl_shader_stage stage)
|
||||
{
|
||||
glsl_type_singleton_init_or_ref();
|
||||
|
||||
_b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, &options, "%s", name);
|
||||
_b = nir_builder_init_simple_shader(stage, &options, "%s", name);
|
||||
b = &_b;
|
||||
|
||||
b->shader->info.next_stage = MESA_SHADER_NONE;
|
||||
b->shader->info.internal = false;
|
||||
}
|
||||
|
||||
virtual ~nir_test()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue