summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 5604b87..6e2efd9 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -332,7 +332,23 @@ update_fragment_textures(struct st_context *st)
}
-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 */
@@ -352,6 +368,16 @@ const struct st_tracked_state st_update_vertex_texture = {
};
+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)