<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 18, 2017 at 10:32 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Timothy Arceri <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.com</a>><br>
<br>
This will be used to disable the shader cache when xfb is enabled<br>
via the api as we don't currently allow for it when generating the<br>
sha for the shader.<br>
---<br>
src/compiler/glsl/link_<wbr>varyings.cpp | 5 ++++-<br>
src/mesa/main/mtypes.h | 3 +++<br>
2 files changed, 7 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/glsl/link_<wbr>varyings.cpp b/src/compiler/glsl/link_<wbr>varyings.cpp<br>
index 29842ecacd..823d6899d7 100644<br>
--- a/src/compiler/glsl/link_<wbr>varyings.cpp<br>
+++ b/src/compiler/glsl/link_<wbr>varyings.cpp<br>
@@ -1089,9 +1089,12 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,<br>
* however some drivers expect to receive the list of transform feedback<br>
* declarations in order so sort it now for convenience.<br>
*/<br>
- if (has_xfb_qualifiers)<br>
+ if (has_xfb_qualifiers) {<br>
qsort(tfeedback_decls, num_tfeedback_decls, sizeof(*tfeedback_decls),<br>
cmp_xfb_offset);<br>
+ } else {<br>
+ xfb_prog->sh.<wbr>LinkedTransformFeedback->api_<wbr>enabled = true;<br>
+ }<br>
<br>
xfb_prog->sh.<wbr>LinkedTransformFeedback-><wbr>Varyings =<br>
rzalloc_array(xfb_prog, struct gl_transform_feedback_varying_<wbr>info,<br>
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
index a5a1398698..d94ed22b65 100644<br>
--- a/src/mesa/main/mtypes.h<br>
+++ b/src/mesa/main/mtypes.h<br>
@@ -1779,6 +1779,9 @@ struct gl_transform_feedback_buffer<br>
/** Post-link transform feedback info. */<br>
struct gl_transform_feedback_info<br>
{<br>
+ /* Was xfb enabled via the api or in shader layout qualifiers */<br>
+ bool api_enabled;<br></blockquote><div><br></div><div>I have no idea what this patch is doing. However, the comment above seems to directly contradict the code higher above. In particular, we leave this false if there *are* XFB qualifiers. Maybe this is an artifact of history and we just need a new name/comment?<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
unsigned NumOutputs;<br>
<br>
/* Bitmask of active buffer indices. */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.15.0.rc0<br>
<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>
</font></span></blockquote></div><br></div></div>