mesa/st: drop ssbo, image and sampler driver state flags bits

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>
This commit is contained in:
Dave Airlie 2021-12-20 12:56:03 +10:00 committed by Marge Bot
parent 75255a1d06
commit 42c7570eed
7 changed files with 11 additions and 23 deletions

View 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:

View file

@ -4768,24 +4768,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
*/

View 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.

View 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;

View 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;
}
}

View 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;

View 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;