From 8af48fc4d62798dbcc00bcfbbd8bc8f3b47982c7 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 14 Mar 2006 11:23:16 +0000 Subject: More GLSL code: - add texture sampling support; - fix assembly codegen bugs; --- src/mesa/shader/slang/slang_link.h | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'src/mesa/shader/slang/slang_link.h') diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h index 5f8c4e73351..faebae625ea 100644 --- a/src/mesa/shader/slang/slang_link.h +++ b/src/mesa/shader/slang/slang_link.h @@ -42,7 +42,7 @@ typedef struct { slang_export_data_quant *quant; char *name; - GLuint address[SLANG_UNIFORM_BINDING_MAX]; + GLuint address[SLANG_SHADER_MAX]; } slang_uniform_binding; typedef struct @@ -63,6 +63,21 @@ typedef struct GLuint count; } slang_active_uniforms; +typedef struct +{ + slang_export_data_quant *quant; + GLuint frag_address; +} slang_texture_usage; + +typedef struct +{ + slang_texture_usage *table; + GLuint count; +} slang_texture_usages; + +GLvoid slang_texture_usages_ctr (slang_texture_usages *); +GLvoid slang_texture_usages_dtr (slang_texture_usages *); + enum { SLANG_COMMON_FIXED_MODELVIEWMATRIX, @@ -148,16 +163,23 @@ enum SLANG_FRAGMENT_FIXED_MAX }; +enum +{ + SLANG_COMMON_CODE_MAIN, + SLANG_COMMON_CODE_MAX +}; + typedef struct { slang_uniform_bindings uniforms; slang_active_uniforms active_uniforms; - GLuint common_fixed_entries[SLANG_UNIFORM_BINDING_MAX][SLANG_COMMON_FIXED_MAX]; + slang_texture_usages texture_usage; + GLuint common_fixed_entries[SLANG_SHADER_MAX][SLANG_COMMON_FIXED_MAX]; GLuint vertex_fixed_entries[SLANG_VERTEX_FIXED_MAX]; GLuint fragment_fixed_entries[SLANG_FRAGMENT_FIXED_MAX]; - GLuint code[SLANG_UNIFORM_BINDING_MAX]; - slang_machine *machines[SLANG_UNIFORM_BINDING_MAX]; - slang_assembly_file *assemblies[SLANG_UNIFORM_BINDING_MAX]; + GLuint code[SLANG_SHADER_MAX][SLANG_COMMON_CODE_MAX]; + slang_machine *machines[SLANG_SHADER_MAX]; + slang_assembly_file *assemblies[SLANG_SHADER_MAX]; } slang_program; GLvoid slang_program_ctr (slang_program *); -- cgit v1.2.3