Mesa (master): st/mesa: revalidate image atoms when a texture is updated

Ilia Mirkin imirkin at kemper.freedesktop.org
Tue Jun 7 14:21:29 UTC 2016


Module: Mesa
Branch: master
Commit: c81b090c920f90bf86a34c978e10ff336d1edbc0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c81b090c920f90bf86a34c978e10ff336d1edbc0

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sat Jun  4 13:25:35 2016 -0400

st/mesa: revalidate image atoms when a texture is updated

A texture may be redefined with _NEW_TEXTURE, which might have been
bound to a shader image slot. We have to revalidate the image atoms to
pick up on the new resource.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>

---

 src/mesa/state_tracker/st_atom_image.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c
index 9b8f505..f8a0044 100644
--- a/src/mesa/state_tracker/st_atom_image.c
+++ b/src/mesa/state_tracker/st_atom_image.c
@@ -148,7 +148,7 @@ static void bind_vs_images(struct st_context *st)
 const struct st_tracked_state st_bind_vs_images = {
    "st_bind_vs_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_VERTEX_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_vs_images
@@ -168,7 +168,7 @@ static void bind_fs_images(struct st_context *st)
 const struct st_tracked_state st_bind_fs_images = {
    "st_bind_fs_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_FRAGMENT_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_fs_images
@@ -188,7 +188,7 @@ static void bind_gs_images(struct st_context *st)
 const struct st_tracked_state st_bind_gs_images = {
    "st_bind_gs_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_GEOMETRY_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_gs_images
@@ -208,7 +208,7 @@ static void bind_tcs_images(struct st_context *st)
 const struct st_tracked_state st_bind_tcs_images = {
    "st_bind_tcs_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_TESSCTRL_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_tcs_images
@@ -228,7 +228,7 @@ static void bind_tes_images(struct st_context *st)
 const struct st_tracked_state st_bind_tes_images = {
    "st_bind_tes_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_TESSEVAL_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_tes_images
@@ -248,7 +248,7 @@ static void bind_cs_images(struct st_context *st)
 const struct st_tracked_state st_bind_cs_images = {
    "st_bind_cs_images",
    {
-      0,
+      _NEW_TEXTURE,
       ST_NEW_COMPUTE_PROGRAM | ST_NEW_IMAGE_UNITS,
    },
    bind_cs_images




More information about the mesa-commit mailing list