[Mesa-dev] [PATCH 7/8] main/cs: Add gl_context::ComputeProgram

Jordan Justen jordan.l.justen at intel.com
Wed Aug 27 14:30:16 PDT 2014


From: Paul Berry <stereotype441 at gmail.com>

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/main/mtypes.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index cb2a4df..13cdf73 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2351,6 +2351,25 @@ struct gl_fragment_program_state
 
 
 /**
+ * Context state for compute programs.
+ */
+struct gl_compute_program_state
+{
+   GLboolean Enabled;               /**< GL_ARB_compute_shader */
+   GLboolean _Enabled;              /**< Enabled and valid program? */
+   struct gl_compute_program *Current;  /**< user-bound compute program */
+
+   /** Currently enabled and valid program (including internal programs
+    * and compiled shader programs).
+    */
+   struct gl_compute_program *_Current;
+
+   /** Cache of fixed-function programs */
+   struct gl_program_cache *Cache;
+};
+
+
+/**
  * ATI_fragment_shader runtime state
  */
 #define ATI_FS_INPUT_PRIMARY 0
@@ -4153,6 +4172,7 @@ struct gl_context
    struct gl_vertex_program_state VertexProgram;
    struct gl_fragment_program_state FragmentProgram;
    struct gl_geometry_program_state GeometryProgram;
+   struct gl_compute_program_state ComputeProgram;
    struct gl_ati_fragment_shader_state ATIFragmentShader;
 
    struct gl_pipeline_shader_state Pipeline; /**< GLSL pipeline shader object state */
-- 
2.1.0



More information about the mesa-dev mailing list