&st_update_blend,
&st_update_sampler,
&st_update_vertex_texture,
- &st_update_texture,
+ &st_update_fragment_texture,
+ &st_update_geometry_texture,
&st_update_framebuffer,
&st_update_msaa,
&st_update_vs_constants,
extern const struct st_tracked_state st_update_blend;
extern const struct st_tracked_state st_update_msaa;
extern const struct st_tracked_state st_update_sampler;
-extern const struct st_tracked_state st_update_texture;
+extern const struct st_tracked_state st_update_fragment_texture;
extern const struct st_tracked_state st_update_vertex_texture;
+extern const struct st_tracked_state st_update_geometry_texture;
extern const struct st_tracked_state st_finalize_textures;
extern const struct st_tracked_state st_update_fs_constants;
extern const struct st_tracked_state st_update_gs_constants;
st->state.samplers[PIPE_SHADER_VERTEX],
&st->state.num_samplers[PIPE_SHADER_VERTEX]);
-/*
- update_shader_samplers(st,
- PIPE_SHADER_GEOMETRY,
- &ctx->GeometryProgram._Current->Base,
- ctx->Const.MaxGeometryTextureImageUnits,
- st->state.samplers[PIPE_SHADER_GEOMETRY],
- &st->state.num_samplers[PIPE_SHADER_GEOMETRY]);
-*/
+ if (ctx->GeometryProgram._Current) {
+ update_shader_samplers(st,
+ PIPE_SHADER_GEOMETRY,
+ &ctx->GeometryProgram._Current->Base,
+ ctx->Const.MaxGeometryTextureImageUnits,
+ st->state.samplers[PIPE_SHADER_GEOMETRY],
+ &st->state.num_samplers[PIPE_SHADER_GEOMETRY]);
+ }
}
}
-const struct st_tracked_state st_update_texture = {
+static void
+update_geometry_textures(struct st_context *st)
+{
+ const struct gl_context *ctx = st->ctx;
+
+ if (ctx->GeometryProgram._Current) {
+ update_textures(st,
+ PIPE_SHADER_GEOMETRY,
+ &ctx->GeometryProgram._Current->Base,
+ ctx->Const.MaxTextureImageUnits,
+ st->state.sampler_views[PIPE_SHADER_GEOMETRY],
+ &st->state.num_sampler_views[PIPE_SHADER_GEOMETRY]);
+ }
+}
+
+
+const struct st_tracked_state st_update_fragment_texture = {
"st_update_texture", /* name */
{ /* dirty */
_NEW_TEXTURE, /* mesa */
};
+const struct st_tracked_state st_update_geometry_texture = {
+ "st_update_geometry_texture", /* name */
+ { /* dirty */
+ _NEW_TEXTURE, /* mesa */
+ ST_NEW_GEOMETRY_PROGRAM, /* st */
+ },
+ update_geometry_textures /* update */
+};
+
+
static void
finalize_textures(struct st_context *st)