aboutsummaryrefslogtreecommitdiffstats
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.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 04ba86448fc..ba3cf9beeb4 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -474,6 +474,38 @@ update_geometry_textures(struct st_context *st)
}
+static void
+update_tessctrl_textures(struct st_context *st)
+{
+ const struct gl_context *ctx = st->ctx;
+
+ if (ctx->TessCtrlProgram._Current) {
+ update_textures(st,
+ PIPE_SHADER_TESS_CTRL,
+ &ctx->TessCtrlProgram._Current->Base,
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits,
+ st->state.sampler_views[PIPE_SHADER_TESS_CTRL],
+ &st->state.num_sampler_views[PIPE_SHADER_TESS_CTRL]);
+ }
+}
+
+
+static void
+update_tesseval_textures(struct st_context *st)
+{
+ const struct gl_context *ctx = st->ctx;
+
+ if (ctx->TessEvalProgram._Current) {
+ update_textures(st,
+ PIPE_SHADER_TESS_EVAL,
+ &ctx->TessEvalProgram._Current->Base,
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits,
+ st->state.sampler_views[PIPE_SHADER_TESS_EVAL],
+ &st->state.num_sampler_views[PIPE_SHADER_TESS_EVAL]);
+ }
+}
+
+
const struct st_tracked_state st_update_fragment_texture = {
"st_update_texture", /* name */
{ /* dirty */
@@ -504,6 +536,26 @@ const struct st_tracked_state st_update_geometry_texture = {
};
+const struct st_tracked_state st_update_tessctrl_texture = {
+ "st_update_tessctrl_texture", /* name */
+ { /* dirty */
+ _NEW_TEXTURE, /* mesa */
+ ST_NEW_TESSCTRL_PROGRAM, /* st */
+ },
+ update_tessctrl_textures /* update */
+};
+
+
+const struct st_tracked_state st_update_tesseval_texture = {
+ "st_update_tesseval_texture", /* name */
+ { /* dirty */
+ _NEW_TEXTURE, /* mesa */
+ ST_NEW_TESSEVAL_PROGRAM, /* st */
+ },
+ update_tesseval_textures /* update */
+};
+
+
static void
finalize_textures(struct st_context *st)