mesa/st: drop ssbo, image and sampler driver state flags bits
authorDave Airlie <airlied@redhat.com>
Mon, 20 Dec 2021 02:56:03 +0000 (12:56 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Dec 2021 19:06:56 +0000 (19:06 +0000)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>

src/mesa/main/bufferobj.c
src/mesa/main/mtypes.h
src/mesa/main/shaderimage.c
src/mesa/main/teximage.c
src/mesa/main/uniform_query.cpp
src/mesa/main/uniforms.c
src/mesa/state_tracker/st_context.c

index 02c1117..3214acd 100644 (file)
@@ -1720,7 +1720,7 @@ bind_shader_storage_buffer(struct gl_context *ctx,
 {
    bind_buffer(ctx, &ctx->ShaderStorageBufferBindings[index],
                bufObj, offset, size, autoSize,
-               ctx->DriverFlags.NewShaderStorageBuffer,
+               ST_NEW_STORAGE_BUFFER,
                USAGE_SHADER_STORAGE_BUFFER);
 }
 
@@ -4502,7 +4502,7 @@ bind_shader_storage_buffers(struct gl_context *ctx, GLuint first,
 
    /* Assume that at least one binding will be changed */
    FLUSH_VERTICES(ctx, 0, 0);
-   ctx->NewDriverState |= ctx->DriverFlags.NewShaderStorageBuffer;
+   ctx->NewDriverState |= ST_NEW_STORAGE_BUFFER;
 
    if (!buffers) {
       /* The ARB_multi_bind spec says:
index d7a20c6..566cbe9 100644 (file)
@@ -4769,24 +4769,11 @@ struct gl_dlist_state
 struct gl_driver_flags
 {
    /**
-    * gl_context::ShaderStorageBufferBindings
-    * gl_shader_program::ShaderStorageBlocks
-    */
-   uint64_t NewShaderStorageBuffer;
-
-   uint64_t NewTextureBuffer;
-
-   /**
     * gl_context::AtomicBufferBindings
     */
    uint64_t NewAtomicBuffer;
 
    /**
-    * gl_context::ImageUnits
-    */
-   uint64_t NewImageUnits;
-
-   /**
     * gl_context::Scissor::WindowRects
     */
    uint64_t NewWindowRectangles;
index a4acd3d..3067a9a 100644 (file)
@@ -37,6 +37,8 @@
 #include "enums.h"
 #include "api_exec_decl.h"
 
+#include "state_tracker/st_context.h"
+
 mesa_format
 _mesa_get_shader_image_format(GLenum format)
 {
@@ -590,7 +592,7 @@ bind_image_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
    u = &ctx->ImageUnits[unit];
 
    FLUSH_VERTICES(ctx, 0, 0);
-   ctx->NewDriverState |= ctx->DriverFlags.NewImageUnits;
+   ctx->NewDriverState |= ST_NEW_IMAGE_UNITS;
 
    set_image_binding(u, texObj, level, layered, layer, access, format);
 }
@@ -688,7 +690,7 @@ bind_image_textures(struct gl_context *ctx, GLuint first, GLuint count,
 
    /* Assume that at least one binding will be changed */
    FLUSH_VERTICES(ctx, 0, 0);
-   ctx->NewDriverState |= ctx->DriverFlags.NewImageUnits;
+   ctx->NewDriverState |= ST_NEW_IMAGE_UNITS;
 
    /* Note that the error semantics for multi-bind commands differ from
     * those of other GL commands.
index 2d0f6d4..0adb80c 100644 (file)
@@ -59,6 +59,7 @@
 #include "api_exec_decl.h"
 
 #include "state_tracker/st_cb_texture.h"
+#include "state_tracker/st_context.h"
 #include "state_tracker/st_format.h"
 #include "state_tracker/st_gen_mipmap.h"
 #include "state_tracker/st_cb_eglimage.h"
@@ -6360,7 +6361,7 @@ texture_buffer_range(struct gl_context *ctx,
       }
    }
 
-   ctx->NewDriverState |= ctx->DriverFlags.NewTextureBuffer;
+   ctx->NewDriverState |= ST_NEW_SAMPLER_VIEWS;
 
    if (bufObj) {
       bufObj->UsageHistory |= USAGE_TEXTURE_BUFFER;
index 36faccf..86e25c8 100644 (file)
@@ -39,6 +39,7 @@
 #include "compiler/glsl/program.h"
 #include "util/bitscan.h"
 
+#include "state_tracker/st_context.h"
 
 /* This is one of the few glGet that can be called from the app thread safely.
  * Only these conditions must be met:
@@ -1613,7 +1614,7 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
          }
       }
 
-      ctx->NewDriverState |= ctx->DriverFlags.NewImageUnits;
+      ctx->NewDriverState |= ST_NEW_IMAGE_UNITS;
    }
 }
 
index 365eaf2..6bb8727 100644 (file)
@@ -1173,7 +1173,7 @@ shader_storage_block_binding(struct gl_context *ctx,
        shaderStorageBlockBinding) {
 
       FLUSH_VERTICES(ctx, 0, 0);
-      ctx->NewDriverState |= ctx->DriverFlags.NewShaderStorageBuffer;
+      ctx->NewDriverState |= ST_NEW_STORAGE_BUFFER;
 
       shProg->data->ShaderStorageBlocks[shaderStorageBlockIndex].Binding =
          shaderStorageBlockBinding;
index f9ede36..b77dd90 100644 (file)
@@ -448,13 +448,10 @@ st_init_driver_flags(struct st_context *st)
    struct gl_driver_flags *f = &st->ctx->DriverFlags;
 
    /* Shader resources */
-   f->NewTextureBuffer = ST_NEW_SAMPLER_VIEWS;
    if (st->has_hw_atomics)
       f->NewAtomicBuffer = ST_NEW_HW_ATOMICS | ST_NEW_CS_ATOMICS;
    else
       f->NewAtomicBuffer = ST_NEW_ATOMIC_BUFFER;
-   f->NewShaderStorageBuffer = ST_NEW_STORAGE_BUFFER;
-   f->NewImageUnits = ST_NEW_IMAGE_UNITS;
 
    f->NewShaderConstants[MESA_SHADER_VERTEX] = ST_NEW_VS_CONSTANTS;
    f->NewShaderConstants[MESA_SHADER_TESS_CTRL] = ST_NEW_TCS_CONSTANTS;