From cc1591667d55a6dbfafbd3d6a7afa9f9288c625d Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 21 Feb 2006 12:35:06 +0000 Subject: More GLSL code: - uniforms (only GetLocation, Uniform1f and Uniform4fv for now for demos); - fix bugs and optimize array size handling; - 2D texture sampling (needs Enable(TEXTURE_2D) to work); - decrease built-in library assembly size by 30%. --- src/mesa/shader/slang/slang_compile_variable.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/slang/slang_compile_variable.h') diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index 7ef83852f4..4261dd1689 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -25,6 +25,8 @@ #if !defined SLANG_COMPILE_VARIABLE_H #define SLANG_COMPILE_VARIABLE_H +#include "slang_export.h" + #if defined __cplusplus extern "C" { #endif @@ -110,7 +112,7 @@ typedef struct slang_variable_ { slang_fully_specified_type type; slang_atom a_name; - struct slang_operation_ *array_size; /* type: spec_array */ + GLuint array_len; /* type: spec_array */ struct slang_operation_ *initializer; unsigned int address; unsigned int size; @@ -123,6 +125,27 @@ int slang_variable_copy (slang_variable *, const slang_variable *); slang_variable *_slang_locate_variable (slang_variable_scope *, slang_atom a_name, GLboolean all); +typedef struct +{ + slang_export_data_quant *quant; + char *name; +} slang_active_uniform; + +typedef struct +{ + slang_active_uniform *table; + GLuint count; +} slang_active_uniforms; + +GLvoid slang_active_uniforms_ctr (slang_active_uniforms *); +GLvoid slang_active_uniforms_dtr (slang_active_uniforms *); +GLboolean slang_active_uniforms_add (slang_active_uniforms *, slang_export_data_quant *, + const char *); + +GLboolean _slang_build_export_data_table (slang_export_data_table *, slang_variable_scope *); + +GLboolean _slang_gather_active_uniforms (slang_active_uniforms *, slang_export_data_table *); + #ifdef __cplusplus } #endif -- cgit v1.2.3