[Mesa-dev] [PATCH 10/14] st: add st_glsl_type_size_scalar() helper

Marek Olšák maraeo at gmail.com
Mon Mar 19 23:38:26 UTC 2018


On Mon, Mar 19, 2018 at 7:37 PM, Timothy Arceri <tarceri at itsqueeze.com>
wrote:

>
>
> On 20/03/18 10:27, Marek Olšák wrote:
>
>> On Wed, Mar 14, 2018 at 2:01 AM, Timothy Arceri <tarceri at itsqueeze.com
>> <mailto:tarceri at itsqueeze.com>> wrote:
>>
>>     This will be used to support uniform packing.
>>     ---
>>      src/mesa/state_tracker/st_glsl_types.cpp | 43
>>     ++++++++++++++++++++++++++++++++
>>      src/mesa/state_tracker/st_glsl_types.h   |  1 +
>>      2 files changed, 44 insertions(+)
>>
>>     diff --git a/src/mesa/state_tracker/st_glsl_types.cpp
>>     b/src/mesa/state_tracker/st_glsl_types.cpp
>>     index e57fbc8f31..5dbfab4dce 100644
>>     --- a/src/mesa/state_tracker/st_glsl_types.cpp
>>     +++ b/src/mesa/state_tracker/st_glsl_types.cpp
>>     @@ -106,3 +106,46 @@ st_glsl_storage_type_size(const struct
>>     glsl_type *type, bool is_bindless)
>>         }
>>         return 0;
>>      }
>>     +
>>     +int
>>     +st_glsl_type_size_scalar(const struct glsl_type *type)
>>
>>
>> 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.
>>
>
> 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.
>
> Happy to rename if you have any suggestions?
>

st_glsl_type_dword_size

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180319/da4bcc43/attachment-0001.html>


More information about the mesa-dev mailing list