X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fshader%2Fslang%2Fslang_storage.h;h=209f8674d974ca0377a03cc0c0ede1bb5b8f2392;hb=e3358dea660f5dec53a8be9e38d725f4fd829e14;hp=532ea638ee7cbf58107e6582bdb66db8bebc86d7;hpb=9ac9605de156408580b81ba7e2780bd3f5372c6d;p=mesa.git diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h index 532ea638ee7..209f8674d97 100644 --- a/src/mesa/shader/slang/slang_storage.h +++ b/src/mesa/shader/slang/slang_storage.h @@ -41,13 +41,19 @@ extern "C" { * * For now, only the three basic types are supported, that is bool, int and float. Other built-in * types like vector or matrix can easily be decomposed into a series of basic types. + * + * If the vec4 module is enabled, 4-component vectors of floats are used when possible. 4x4 matrices + * are constructed of 4 vec4 slots. */ typedef enum slang_storage_type_ { - slang_stor_aggregate, - slang_stor_bool, - slang_stor_int, - slang_stor_float + /* core */ + slang_stor_aggregate, + slang_stor_bool, + slang_stor_int, + slang_stor_float, + /* vec4 */ + slang_stor_vec4 } slang_storage_type; /* @@ -105,6 +111,14 @@ _slang_evaluate_int(slang_assembly_file *file, GLuint *pint, slang_atom_pool *atoms); +/* + * Returns the size (in machine units) of the given storage type. + * It is an error to pass-in slang_stor_aggregate. + * Returns 0 on error. + */ +extern GLuint +_slang_sizeof_type (slang_storage_type); + /* * Returns total size (in machine units) of the given aggregate. * Returns 0 on error.