Reviewed-by: Brian Paul <bri...@vmware.com>

On 07/24/2015 11:48 AM, Marek Olšák wrote:
From: Marek Olšák <marek.ol...@amd.com>

Fixes piglit:
   spec@arb_texture_buffer_range@ranges-2

Cc: mesa-sta...@lists.freedesktop.org
---
  src/mesa/state_tracker/st_atom_texture.c | 10 +++++-----
  src/mesa/state_tracker/st_context.c      |  1 +
  src/mesa/state_tracker/st_context.h      |  1 +
  3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_texture.c 
b/src/mesa/state_tracker/st_atom_texture.c
index 4012d88..3d36a6d 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -540,7 +540,7 @@ const struct st_tracked_state st_update_fragment_texture = {
     "st_update_texture",                                     /* name */
     {                                                  /* dirty */
        _NEW_TEXTURE,                                   /* mesa */
-      ST_NEW_FRAGMENT_PROGRAM,                         /* st */
+      ST_NEW_FRAGMENT_PROGRAM | ST_NEW_SAMPLER_VIEWS,  /* st */
     },
     update_fragment_textures                           /* update */
  };
@@ -550,7 +550,7 @@ const struct st_tracked_state st_update_vertex_texture = {
     "st_update_vertex_texture",                              /* name */
     {                                                  /* dirty */
        _NEW_TEXTURE,                                   /* mesa */
-      ST_NEW_VERTEX_PROGRAM,                           /* st */
+      ST_NEW_VERTEX_PROGRAM | ST_NEW_SAMPLER_VIEWS,    /* st */
     },
     update_vertex_textures                             /* update */
  };
@@ -560,7 +560,7 @@ const struct st_tracked_state st_update_geometry_texture = {
     "st_update_geometry_texture",                    /* name */
     {                                                  /* dirty */
        _NEW_TEXTURE,                                   /* mesa */
-      ST_NEW_GEOMETRY_PROGRAM,                         /* st */
+      ST_NEW_GEOMETRY_PROGRAM | ST_NEW_SAMPLER_VIEWS,  /* st */
     },
     update_geometry_textures                           /* update */
  };
@@ -570,7 +570,7 @@ const struct st_tracked_state st_update_tessctrl_texture = {
     "st_update_tessctrl_texture",                    /* name */
     {                                                  /* dirty */
        _NEW_TEXTURE,                                   /* mesa */
-      ST_NEW_TESSCTRL_PROGRAM,                         /* st */
+      ST_NEW_TESSCTRL_PROGRAM | ST_NEW_SAMPLER_VIEWS,  /* st */
     },
     update_tessctrl_textures                           /* update */
  };
@@ -580,7 +580,7 @@ const struct st_tracked_state st_update_tesseval_texture = {
     "st_update_tesseval_texture",                    /* name */
     {                                                  /* dirty */
        _NEW_TEXTURE,                                   /* mesa */
-      ST_NEW_TESSEVAL_PROGRAM,                         /* st */
+      ST_NEW_TESSEVAL_PROGRAM | ST_NEW_SAMPLER_VIEWS,  /* st */
     },
     update_tesseval_textures                           /* update */
  };
diff --git a/src/mesa/state_tracker/st_context.c 
b/src/mesa/state_tracker/st_context.c
index 44244a1..72c23ca 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -314,6 +314,7 @@ static void st_init_driver_flags(struct gl_driver_flags *f)
     f->NewRasterizerDiscard = ST_NEW_RASTERIZER;
     f->NewUniformBuffer = ST_NEW_UNIFORM_BUFFER;
     f->NewDefaultTessLevels = ST_NEW_TESS_STATE;
+   f->NewTextureBuffer = ST_NEW_SAMPLER_VIEWS;
  }

  struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
diff --git a/src/mesa/state_tracker/st_context.h 
b/src/mesa/state_tracker/st_context.h
index 0d89260..48c9b6f 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -60,6 +60,7 @@ struct u_upload_mgr;
  #define ST_NEW_UNIFORM_BUFFER          (1 << 8)
  #define ST_NEW_TESSCTRL_PROGRAM        (1 << 9)
  #define ST_NEW_TESSEVAL_PROGRAM        (1 << 10)
+#define ST_NEW_SAMPLER_VIEWS           (1 << 11)


  struct st_state_flags {


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to