<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 10, 2017 at 9:57 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">With shaders using a lot of inputs/outputs, like this (from Gtk+) :<br>
<br>
layout(location = 0) in vec2 inPos;<br>
layout(location = 1) in float inGradientPos;<br>
layout(location = 2) in flat int inRepeating;<br>
layout(location = 3) in flat int inStopCount;<br>
layout(location = 4) in flat vec4 inClipBounds;<br>
layout(location = 5) in flat vec4 inClipWidths;<br>
layout(location = 6) in flat ColorStop inStops[8];<br>
<br>
layout(location = 0) out vec4 outColor;<br>
<br>
we're missing the programming of the input_slots_valid field leading<br>
to an assert further down the backend code.<br>
<br>
</span><span class="">v2: Use valid slots of the geometry or vertex stage (Jason)<br>
<br>
v3: Use helper to find correct vue map (Jason)<br>
<br>
</span>v4: Set the valid slots off the previous stages (Jason)<br>
<span class=""><br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
---<br>
</span> src/intel/vulkan/anv_pipeline.<wbr>c | 9 ++++++---<br>
1 file changed, 6 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>pipeline.c b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
index 2c46ef5bf9..dbf1078e5f 100644<br>
--- a/src/intel/vulkan/anv_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
@@ -256,17 +256,20 @@ populate_gs_prog_key(const struct gen_device_info *devinfo,<br>
}<br>
<br>
static void<br>
-populate_wm_prog_key(const struct gen_device_info *devinfo,<br>
+populate_wm_prog_key(const struct anv_pipeline *pipeline,<br>
const VkGraphicsPipelineCreateInfo *info,<br>
struct brw_wm_prog_key *key)<br>
{<br>
+ const struct gen_device_info *devinfo = &pipeline->device->info;<br>
ANV_FROM_HANDLE(anv_render_<wbr>pass, render_pass, info->renderPass);<br>
<br>
memset(key, 0, sizeof(*key));<br>
<span class=""><br>
populate_sampler_prog_key(<wbr>devinfo, &key->tex);<br>
<br>
- /* TODO: Fill out key->input_slots_valid */<br></span></blockquote><div><br></div><div>Mind leaving a TODO about wanting to set it to 0 based on NIR but not being able to yet?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span><span class="">+ const struct brw_vue_map *vue_map =<br>
+ anv_pipeline_get_fs_input_map(<wbr>pipeline);<br>
+ key->input_slots_valid = vue_map->slots_valid;<br>
<br>
</span><span class=""> /* Vulkan doesn't specify a default */<br>
key->high_quality_derivatives = false;<br>
</span>@@ -592,7 +595,7 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,<br>
struct anv_shader_bin *bin = NULL;<br>
unsigned char sha1[20];<br>
<br>
- populate_wm_prog_key(&<wbr>pipeline->device->info, info, &key);<br>
+ populate_wm_prog_key(pipeline, info, &key);<br>
<br>
if (cache) {<br>
anv_hash_shader(sha1, &key, sizeof(key), module, entrypoint,<br>
<div class="HOEnZb"><div class="h5">--<br>
2.11.0<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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>
</div></div></blockquote></div><br></div></div>