diff options
Diffstat (limited to 'src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 3e3775200a8..b4e6f9b639a 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -534,6 +534,22 @@ update_tesseval_textures(struct st_context *st) } +static void +update_compute_textures(struct st_context *st) +{ + const struct gl_context *ctx = st->ctx; + + if (ctx->ComputeProgram._Current) { + update_textures(st, + MESA_SHADER_COMPUTE, + &ctx->ComputeProgram._Current->Base, + ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits, + st->state.sampler_views[PIPE_SHADER_COMPUTE], + &st->state.num_sampler_views[PIPE_SHADER_COMPUTE]); + } +} + + const struct st_tracked_state st_update_fragment_texture = { "st_update_texture", /* name */ { /* dirty */ @@ -582,3 +598,13 @@ const struct st_tracked_state st_update_tesseval_texture = { }, update_tesseval_textures /* update */ }; + + +const struct st_tracked_state st_update_compute_texture = { + "st_update_compute_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_COMPUTE_PROGRAM | ST_NEW_SAMPLER_VIEWS, /* st */ + }, + update_compute_textures /* update */ +}; |