<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 19, 2018 at 7:37 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 20/03/18 10:27, Marek Olšák wrote:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Mar 14, 2018 at 2:01 AM, Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a> <mailto:<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>><wbr>> wrote:<br>
<br>
This will be used to support uniform packing.<br>
---<br>
src/mesa/state_tracker/st_gls<wbr>l_types.cpp | 43<br>
++++++++++++++++++++++++++++++<wbr>++<br>
src/mesa/state_tracker/st_gls<wbr>l_types.h | 1 +<br>
2 files changed, 44 insertions(+)<br>
<br>
diff --git a/src/mesa/state_tracker/st_gl<wbr>sl_types.cpp<br>
b/src/mesa/state_tracker/st_gl<wbr>sl_types.cpp<br>
index e57fbc8f31..5dbfab4dce 100644<br>
--- a/src/mesa/state_tracker/st_gl<wbr>sl_types.cpp<br>
+++ b/src/mesa/state_tracker/st_gl<wbr>sl_types.cpp<br>
@@ -106,3 +106,46 @@ st_glsl_storage_type_size(cons<wbr>t struct<br>
glsl_type *type, bool is_bindless)<br>
}<br>
return 0;<br>
}<br>
+<br>
+int<br>
+st_glsl_type_size_scalar(cons<wbr>t struct glsl_type *type)<br>
<br>
<br>
I don't know what "type_size_scalar" means, but the function seems to return the type size in dwords. I'd like a clearer name.<br>
</blockquote>
<br></span>
This is the naming used in i965 for this type of function. Basically we are just returning the number of components as opposed to returning 1 for everything from float to vec4.<br>
<br>
Happy to rename if you have any suggestions?<br></blockquote><div><br></div><div>st_glsl_type_dword_size</div><div><br></div><div>Marek<br></div></div></div></div>