<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 17, 2016 at 11:12 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:timothy.arceri@collabora.com" target="_blank">timothy.arceri@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And pass in a pointer to the shader info in gl_program for ARB programs.<br>
---<br>
src/amd/vulkan/radv_meta_<wbr>blit.c | 12 ++++++++----<br>
src/amd/vulkan/radv_meta_blit<wbr>2d.c | 12 ++++++++----<br>
src/amd/vulkan/radv_meta_buff<wbr>er.c | 6 ++++--<br>
src/amd/vulkan/radv_meta_bufi<wbr>mage.c | 3 ++-<br>
src/amd/vulkan/radv_meta_clea<wbr>r.c | 12 ++++++++----<br>
src/amd/vulkan/radv_meta_deco<wbr>mpress.c | 6 ++++--<br>
src/amd/vulkan/radv_meta_<wbr>fast_clear.c | 6 ++++--<br>
src/amd/vulkan/radv_meta_reso<wbr>lve.c | 6 ++++--<br>
src/amd/vulkan/radv_meta_reso<wbr>lve_cs.c | 2 +-<br>
src/amd/vulkan/radv_pipeline.<wbr>c | 2 +-<br>
src/compiler/nir/nir_builder.<wbr>h | 5 +++--<br>
src/compiler/nir/tests/contro<wbr>l_flow_tests.cpp | 3 ++-<br>
src/gallium/auxiliary/nir/tgs<wbr>i_to_nir.c | 2 +-<br>
src/intel/blorp/blorp_blit.c | 2 +-<br>
src/intel/blorp/blorp_clear.<wbr>c | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>brw_program.c | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>brw_program.h | 2 +-<br>
src/mesa/drivers/dri/i965/<wbr>brw_tcs.c | 3 ++-<br>
src/mesa/program/prog_to_nir.<wbr>c | 5 +++--<br>
src/mesa/program/prog_to_nir.<wbr>h | 2 +-<br>
20 files changed, 60 insertions(+), 35 deletions(-)<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_bli<wbr>t.c b/src/amd/vulkan/radv_meta_bli<wbr>t.c<br>
index bfbf880..3eda43e 100644<br>
--- a/src/amd/vulkan/radv_meta_bli<wbr>t.c<br>
+++ b/src/amd/vulkan/radv_meta_bli<wbr>t.c<br>
@@ -37,7 +37,8 @@ build_nir_vertex_shader(void)<br>
const struct glsl_type *vec4 = glsl_vec4_type();<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_blit_vs");<br>
<br>
nir_variable *pos_in = nir_variable_create(b.shader, nir_var_shader_in,<br>
@@ -67,7 +68,8 @@ build_nir_copy_fragment_shader<wbr>(enum glsl_sampler_dim tex_dim)<br>
const struct glsl_type *vec4 = glsl_vec4_type();<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
<br>
sprintf(shader_name, "meta_blit_fs.%d", tex_dim);<br>
b.shader->info->name = ralloc_strdup(b.shader, shader_name);<br>
@@ -121,7 +123,8 @@ build_nir_copy_fragment_shader<wbr>_depth(enum glsl_sampler_dim tex_dim)<br>
const struct glsl_type *vec4 = glsl_vec4_type();<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
<br>
sprintf(shader_name, "meta_blit_depth_fs.%d", tex_dim);<br>
b.shader->info->name = ralloc_strdup(b.shader, shader_name);<br>
@@ -175,7 +178,8 @@ build_nir_copy_fragment_shader<wbr>_stencil(enum glsl_sampler_dim tex_dim)<br>
const struct glsl_type *vec4 = glsl_vec4_type();<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
<br>
sprintf(shader_name, "meta_blit_stencil_fs.%d", tex_dim);<br>
b.shader->info->name = ralloc_strdup(b.shader, shader_name);<br>
diff --git a/src/amd/vulkan/radv_meta_bli<wbr>t2d.c b/src/amd/vulkan/radv_meta_bli<wbr>t2d.c<br>
index 6e92f80..bed03a3 100644<br>
--- a/src/amd/vulkan/radv_meta_bli<wbr>t2d.c<br>
+++ b/src/amd/vulkan/radv_meta_bli<wbr>t2d.c<br>
@@ -438,7 +438,8 @@ build_nir_vertex_shader(void)<br>
const struct glsl_type *vec2 = glsl_vector_type(GLSL_TYPE_FLO<wbr>AT, 2);<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_blit_vs");<br>
<br>
nir_variable *pos_in = nir_variable_create(b.shader, nir_var_shader_in,<br>
@@ -573,7 +574,8 @@ build_nir_copy_fragment_shader<wbr>(struct radv_device *device,<br>
const struct glsl_type *vec2 = glsl_vector_type(GLSL_TYPE_FLO<wbr>AT, 2);<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, name);<br>
<br>
nir_variable *tex_pos_in = nir_variable_create(b.shader, nir_var_shader_in,<br>
@@ -602,7 +604,8 @@ build_nir_copy_fragment_shader<wbr>_depth(struct radv_device *device,<br>
const struct glsl_type *vec2 = glsl_vector_type(GLSL_TYPE_FLO<wbr>AT, 2);<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, name);<br>
<br>
nir_variable *tex_pos_in = nir_variable_create(b.shader, nir_var_shader_in,<br>
@@ -631,7 +634,8 @@ build_nir_copy_fragment_shader<wbr>_stencil(struct radv_device *device,<br>
const struct glsl_type *vec2 = glsl_vector_type(GLSL_TYPE_FLO<wbr>AT, 2);<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, name);<br>
<br>
nir_variable *tex_pos_in = nir_variable_create(b.shader, nir_var_shader_in,<br>
diff --git a/src/amd/vulkan/radv_meta_buf<wbr>fer.c b/src/amd/vulkan/radv_meta_buf<wbr>fer.c<br>
index 05c4971..6294975 100644<br>
--- a/src/amd/vulkan/radv_meta_buf<wbr>fer.c<br>
+++ b/src/amd/vulkan/radv_meta_buf<wbr>fer.c<br>
@@ -9,7 +9,8 @@ build_buffer_fill_shader(struc<wbr>t radv_device *dev)<br>
{<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_buffer_fill");<br>
b.shader->info->cs.local_size[<wbr>0] = 64;<br>
b.shader->info->cs.local_size[<wbr>1] = 1;<br>
@@ -59,7 +60,8 @@ build_buffer_copy_shader(struc<wbr>t radv_device *dev)<br>
{<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_buffer_copy");<br>
b.shader->info->cs.local_size[<wbr>0] = 64;<br>
b.shader->info->cs.local_size[<wbr>1] = 1;<br>
diff --git a/src/amd/vulkan/radv_meta_buf<wbr>image.c b/src/amd/vulkan/radv_meta_buf<wbr>image.c<br>
index c9dd072..005b52c 100644<br>
--- a/src/amd/vulkan/radv_meta_buf<wbr>image.c<br>
+++ b/src/amd/vulkan/radv_meta_buf<wbr>image.c<br>
@@ -13,7 +13,8 @@ build_nir_itob_compute_shader(<wbr>struct radv_device *dev)<br>
false,<br>
false,<br>
GLSL_TYPE_FLOAT);<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_itob_cs");<br>
b.shader->info->cs.local_size[<wbr>0] = 16;<br>
b.shader->info->cs.local_size[<wbr>1] = 16;<br>
diff --git a/src/amd/vulkan/radv_meta_cle<wbr>ar.c b/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
index 34b318a..276fc65 100644<br>
--- a/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
+++ b/src/amd/vulkan/radv_meta_cle<wbr>ar.c<br>
@@ -53,8 +53,10 @@ build_color_shaders(struct nir_shader **out_vs,<br>
nir_builder vs_b;<br>
nir_builder fs_b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&vs_b, NULL, MESA_SHADER_VERTEX, NULL);<br>
- nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&vs_b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
<br>
vs_b.shader->info->name = ralloc_strdup(vs_b.shader, "meta_clear_color_vs");<br>
fs_b.shader->info->name = ralloc_strdup(fs_b.shader, "meta_clear_color_fs");<br>
@@ -455,8 +457,10 @@ build_depthstencil_shader(stru<wbr>ct nir_shader **out_vs, struct nir_shader **out_fs<br>
{<br>
nir_builder vs_b, fs_b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&vs_b, NULL, MESA_SHADER_VERTEX, NULL);<br>
- nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&vs_b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
<br>
vs_b.shader->info->name = ralloc_strdup(vs_b.shader, "meta_clear_depthstencil_vs");<br>
fs_b.shader->info->name = ralloc_strdup(fs_b.shader, "meta_clear_depthstencil_fs");<br>
diff --git a/src/amd/vulkan/radv_meta_dec<wbr>ompress.c b/src/amd/vulkan/radv_meta_dec<wbr>ompress.c<br>
index 47ef64d..ff91abd 100644<br>
--- a/src/amd/vulkan/radv_meta_dec<wbr>ompress.c<br>
+++ b/src/amd/vulkan/radv_meta_dec<wbr>ompress.c<br>
@@ -45,7 +45,8 @@ build_nir_vs(void)<br>
nir_variable *a_position;<br>
nir_variable *v_position;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_depth_decomp_vs");<br>
<br>
a_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,<br>
@@ -67,7 +68,8 @@ build_nir_fs(void)<br>
{<br>
nir_builder b;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_asprintf(b.shader,<br>
"meta_depth_decomp_noop_fs");<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_fas<wbr>t_clear.c b/src/amd/vulkan/radv_meta_fas<wbr>t_clear.c<br>
index d3ebf41..89a56d3 100644<br>
--- a/src/amd/vulkan/radv_meta_fas<wbr>t_clear.c<br>
+++ b/src/amd/vulkan/radv_meta_fas<wbr>t_clear.c<br>
@@ -48,7 +48,8 @@ build_nir_vs(void)<br>
nir_variable *a_tex_position;<br>
nir_variable *v_tex_position;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_fast_clear_vs");<br>
<br>
a_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,<br>
@@ -82,7 +83,8 @@ build_nir_fs(void)<br>
nir_variable *v_tex_position; /* vec4, varying texture coordinate */<br>
nir_variable *f_color; /* vec4, fragment output color */<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_asprintf(b.shader,<br>
"meta_fast_clear_fs");<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_res<wbr>olve.c b/src/amd/vulkan/radv_meta_res<wbr>olve.c<br>
index 8e2a353..a937dea 100644<br>
--- a/src/amd/vulkan/radv_meta_res<wbr>olve.c<br>
+++ b/src/amd/vulkan/radv_meta_res<wbr>olve.c<br>
@@ -48,7 +48,8 @@ build_nir_vs(void)<br>
nir_variable *a_tex_position;<br>
nir_variable *v_tex_position;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "meta_resolve_vs");<br>
<br>
a_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,<br>
@@ -82,7 +83,8 @@ build_nir_fs(void)<br>
nir_variable *v_tex_position; /* vec4, varying texture coordinate */<br>
nir_variable *f_color; /* vec4, fragment output color */<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL,<br>
+ NULL);<br>
b.shader->info->name = ralloc_asprintf(b.shader,<br>
"meta_resolve_fs");<br>
<br>
diff --git a/src/amd/vulkan/radv_meta_res<wbr>olve_cs.c b/src/amd/vulkan/radv_meta_res<wbr>olve_cs.c<br>
index 126823b..8d62ef9 100644<br>
--- a/src/amd/vulkan/radv_meta_res<wbr>olve_cs.c<br>
+++ b/src/amd/vulkan/radv_meta_res<wbr>olve_cs.c<br>
@@ -46,7 +46,7 @@ build_resolve_compute_shader(s<wbr>truct radv_device *dev, bool is_integer, int sampl<br>
false,<br>
GLSL_TYPE_FLOAT);<br>
snprintf(name, 64, "meta_resolve_cs-%d-%s", samples, is_integer ? "int" : "float");<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_COMPUTE, NULL, NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, name);<br>
b.shader->info->cs.local_size[<wbr>0] = 16;<br>
b.shader->info->cs.local_size[<wbr>1] = 16;<br>
diff --git a/src/amd/vulkan/radv_pipeline<wbr>.c b/src/amd/vulkan/radv_pipeline<wbr>.c<br>
index edc0674e..921b602 100644<br>
--- a/src/amd/vulkan/radv_pipeline<wbr>.c<br>
+++ b/src/amd/vulkan/radv_pipeline<wbr>.c<br>
@@ -1215,7 +1215,7 @@ radv_pipeline_init(struct radv_pipeline *pipeline,<br>
<br>
if (!modules[MESA_SHADER_FRAGMENT<wbr>]) {<br>
nir_builder fs_b;<br>
- nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL, NULL);<br>
fs_b.shader->info->name = ralloc_strdup(fs_b.shader, "noop_fs");<br>
fs_m.nir = fs_b.shader;<br>
modules[MESA_SHADER_FRAGMENT] = &fs_m;<br>
diff --git a/src/compiler/nir/nir_builder<wbr>.h b/src/compiler/nir/nir_builder<wbr>.h<br>
index 0ee7d1a..5ff84e2 100644<br>
--- a/src/compiler/nir/nir_builder<wbr>.h<br>
+++ b/src/compiler/nir/nir_builder<wbr>.h<br>
@@ -50,9 +50,10 @@ nir_builder_init(nir_builder *build, nir_function_impl *impl)<br>
static inline void<br>
nir_builder_init_simple_shade<wbr>r(nir_builder *build, void *mem_ctx,<br>
gl_shader_stage stage,<br>
- const nir_shader_compiler_options *options)<br>
+ const nir_shader_compiler_options *options,<br>
+ shader_info *si)<br></blockquote><div><br></div><div>Do we really need to add this just for prog_to_nir? It seems like prog_to_nir could just replace the pointer in the nir_shader. Or we could create the shader directly since prog_to_nir really isn't the "simple" case.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
{<br>
- build->shader = nir_shader_create(mem_ctx, stage, options, NULL);<br>
+ build->shader = nir_shader_create(mem_ctx, stage, options, si);<br>
nir_function *func = nir_function_create(build->sha<wbr>der, "main");<br>
build->exact = false;<br>
build->impl = nir_function_impl_create(func)<wbr>;<br>
diff --git a/src/compiler/nir/tests/contr<wbr>ol_flow_tests.cpp b/src/compiler/nir/tests/contr<wbr>ol_flow_tests.cpp<br>
index ae0954f..0b70f57 100644<br>
--- a/src/compiler/nir/tests/contr<wbr>ol_flow_tests.cpp<br>
+++ b/src/compiler/nir/tests/contr<wbr>ol_flow_tests.cpp<br>
@@ -35,7 +35,8 @@ protected:<br>
nir_cf_test::nir_cf_test()<br>
{<br>
static const nir_shader_compiler_options options = { };<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, &options);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_VERTEX, &options,<br>
+ NULL);<br>
}<br>
<br>
nir_cf_test::~nir_cf_test()<br>
diff --git a/src/gallium/auxiliary/nir/tg<wbr>si_to_nir.c b/src/gallium/auxiliary/nir/tg<wbr>si_to_nir.c<br>
index 3f05acd..adeea60 100644<br>
--- a/src/gallium/auxiliary/nir/tg<wbr>si_to_nir.c<br>
+++ b/src/gallium/auxiliary/nir/tg<wbr>si_to_nir.c<br>
@@ -1999,7 +1999,7 @@ tgsi_to_nir(const void *tgsi_tokens,<br>
<br>
nir_builder_init_simple_shader<wbr>(&c->build, NULL,<br>
tgsi_processor_to_shader_stag<wbr>e(scan.processor),<br>
- options);<br>
+ options, NULL);<br>
s = c->build.shader;<br>
<br>
s->num_inputs = scan.file_max[TGSI_FILE_INPUT] + 1;<br>
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c<br>
index 0c3ee72..d7a7763 100644<br>
--- a/src/intel/blorp/blorp_blit.c<br>
+++ b/src/intel/blorp/blorp_blit.c<br>
@@ -1044,7 +1044,7 @@ brw_blorp_build_nir_shader(str<wbr>uct blorp_context *blorp,<br>
(key->dst_samples <= 1));<br>
<br>
nir_builder b;<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL, NULL);<br>
<br>
struct brw_blorp_blit_vars v;<br>
brw_blorp_blit_vars_init(&b, &v, key);<br>
diff --git a/src/intel/blorp/blorp_clear.<wbr>c b/src/intel/blorp/blorp_clear.<wbr>c<br>
index f932789..8285e0e 100644<br>
--- a/src/intel/blorp/blorp_clear.<wbr>c<br>
+++ b/src/intel/blorp/blorp_clear.<wbr>c<br>
@@ -55,7 +55,7 @@ blorp_params_get_clear_kernel(<wbr>struct blorp_context *blorp,<br>
void *mem_ctx = ralloc_context(NULL);<br>
<br>
nir_builder b;<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_FRAGMENT, NULL, NULL);<br>
b.shader->info->name = ralloc_strdup(b.shader, "BLORP-clear");<br>
<br>
nir_variable *v_color = nir_variable_create(b.shader, nir_var_shader_in,<br>
diff --git a/src/mesa/drivers/dri/i965/br<wbr>w_program.c b/src/mesa/drivers/dri/i965/br<wbr>w_program.c<br>
index 7151558..8c0c936 100644<br>
--- a/src/mesa/drivers/dri/i965/br<wbr>w_program.c<br>
+++ b/src/mesa/drivers/dri/i965/br<wbr>w_program.c<br>
@@ -64,7 +64,7 @@ brw_nir_lower_uniforms(nir_sha<wbr>der *nir, bool is_scalar)<br>
nir_shader *<br>
brw_create_nir(struct brw_context *brw,<br>
const struct gl_shader_program *shader_prog,<br>
- const struct gl_program *prog,<br>
+ struct gl_program *prog,<br>
gl_shader_stage stage,<br>
bool is_scalar)<br>
{<br>
diff --git a/src/mesa/drivers/dri/i965/br<wbr>w_program.h b/src/mesa/drivers/dri/i965/br<wbr>w_program.h<br>
index eed07a2..7b24dbb 100644<br>
--- a/src/mesa/drivers/dri/i965/br<wbr>w_program.h<br>
+++ b/src/mesa/drivers/dri/i965/br<wbr>w_program.h<br>
@@ -34,7 +34,7 @@ struct brw_context;<br>
<br>
struct nir_shader *brw_create_nir(struct brw_context *brw,<br>
const struct gl_shader_program *shader_prog,<br>
- const struct gl_program *prog,<br>
+ struct gl_program *prog,<br>
gl_shader_stage stage,<br>
bool is_scalar);<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/br<wbr>w_tcs.c b/src/mesa/drivers/dri/i965/br<wbr>w_tcs.c<br>
index 7511507..0910d24 100644<br>
--- a/src/mesa/drivers/dri/i965/br<wbr>w_tcs.c<br>
+++ b/src/mesa/drivers/dri/i965/br<wbr>w_tcs.c<br>
@@ -41,7 +41,8 @@ create_passthrough_tcs(const struct brw_compiler *compiler,<br>
const struct brw_tcs_prog_key *key)<br>
{<br>
nir_builder b;<br>
- nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_TESS_CTRL, options);<br>
+ nir_builder_init_simple_shade<wbr>r(&b, NULL, MESA_SHADER_TESS_CTRL, options,<br>
+ NULL);<br>
nir_shader *nir = b.shader;<br>
nir_variable *var;<br>
nir_intrinsic_instr *load;<br>
diff --git a/src/mesa/program/prog_to_nir<wbr>.c b/src/mesa/program/prog_to_nir<wbr>.c<br>
index a65d4bf..a675bc6 100644<br>
--- a/src/mesa/program/prog_to_nir<wbr>.c<br>
+++ b/src/mesa/program/prog_to_nir<wbr>.c<br>
@@ -1006,7 +1006,7 @@ setup_registers_and_variables(<wbr>struct ptn_compile *c)<br>
}<br>
<br>
struct nir_shader *<br>
-prog_to_nir(const struct gl_program *prog,<br>
+prog_to_nir(struct gl_program *prog,<br>
const nir_shader_compiler_options *options)<br>
{<br>
struct ptn_compile *c;<br>
@@ -1018,7 +1018,8 @@ prog_to_nir(const struct gl_program *prog,<br>
return NULL;<br>
c->prog = prog;<br>
<br>
- nir_builder_init_simple_shade<wbr>r(&c->build, NULL, stage, options);<br>
+ nir_builder_init_simple_shade<wbr>r(&c->build, NULL, stage, options,<br>
+ &prog->info);<br>
s = c->build.shader;<br>
<br>
if (prog->Parameters->NumParamete<wbr>rs > 0) {<br>
diff --git a/src/mesa/program/prog_to_nir<wbr>.h b/src/mesa/program/prog_to_nir<wbr>.h<br>
index 09425b5..b1e0ec7 100644<br>
--- a/src/mesa/program/prog_to_nir<wbr>.h<br>
+++ b/src/mesa/program/prog_to_nir<wbr>.h<br>
@@ -31,7 +31,7 @@<br>
extern "C" {<br>
#endif<br>
<br>
-struct nir_shader *prog_to_nir(const struct gl_program *prog,<br>
+struct nir_shader *prog_to_nir(struct gl_program *prog,<br>
const nir_shader_compiler_options *options);<br>
<br>
#ifdef __cplusplus<br>
<span class="m_-3391182522277361339HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>