st/mesa: don't ignore texture buffer state changes
authorMarek Olšák <marek.olsak@amd.com>
Fri, 24 Jul 2015 17:47:06 +0000 (19:47 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 25 Jul 2015 08:37:00 +0000 (10:37 +0200)
Fixes piglit:
  spec@arb_texture_buffer_range@ranges-2

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_texture.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_context.h

index 1e315332560e4d7e63d056df758a7227eb482557..e80f9893ad5a8af778489ea0579d5587be9655d8 100644 (file)
@@ -508,7 +508,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 */
 };
@@ -518,7 +518,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 */
 };
@@ -528,7 +528,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 */
 };
@@ -538,7 +538,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 */
 };
@@ -548,7 +548,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 */
 };
index 44244a1e720f72d7d2dc7cadb7e8f0f9844f8a60..72c23cad4bc95665d0766631ec97d16fa5bf832e 100644 (file)
@@ -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,
index 8183412ceabfd2d6b375ff96da37110f8a0b47d6..a68f881c81c59df7f69309239a7f5fc904134e16 100644 (file)
@@ -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 {