[Mesa-dev] [PATCH 13/17] mesa: Update program_parameter_list to hold number of UBO

Vincent Lejeune vljn at ovi.com
Sun Dec 25 10:20:08 PST 2011


---
 src/mesa/program/ir_to_mesa.cpp   |    2 ++
 src/mesa/program/prog_parameter.h |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index a5f8eea..e873d3d 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2693,6 +2693,8 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
 	 last_location = location;
       }
    }
+
+   params->NumUBO = shader_program->UBOCount;
 }
 
 static void
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index 3c6dc8c..9266861 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -100,6 +100,7 @@ struct gl_program_parameter_list
    gl_constant_value (*ParameterValues)[4]; /**< Array [Size] of constant[4] */
    GLbitfield StateFlags; /**< _NEW_* flags indicating which state changes
                                might invalidate ParameterValues[] */
+   GLuint NumUBO; /** Number of UBO in the program */
 };
 
 
-- 
1.7.7



More information about the mesa-dev mailing list