glsl: Refactor matrix stride calculation into a utility function

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
This commit is contained in:
Ian Romanick
2017-11-01 16:27:53 -07:00
parent 88f5588f77
commit 24e78d99db
2 changed files with 50 additions and 11 deletions

View File

@@ -92,6 +92,10 @@ link_intrastage_shaders(void *mem_ctx,
unsigned num_shaders,
bool allow_missing_main);
extern unsigned
link_calculate_matrix_stride(const glsl_type *matrix, bool row_major,
enum glsl_interface_packing packing);
/**
* Class for processing all of the leaf fields of a variable that corresponds
* to a program resource.