[Mesa-dev] [PATCH 12/31] mesa: remove _NEW_BUFFER_OBJECT
Marek Olšák
maraeo at gmail.com
Mon Jun 12 16:55:37 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
not used
---
src/mesa/drivers/dri/i965/brw_state_upload.c | 1 -
src/mesa/main/bufferobj.c | 4 ++--
src/mesa/main/mtypes.h | 5 ++---
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 9a858e6..926597b 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -243,21 +243,20 @@ static struct dirty_bit_map mesa_bits[] = {
DEFINE_BIT(_NEW_VIEWPORT),
DEFINE_BIT(_NEW_TEXTURE_STATE),
DEFINE_BIT(_NEW_ARRAY),
DEFINE_BIT(_NEW_RENDERMODE),
DEFINE_BIT(_NEW_BUFFERS),
DEFINE_BIT(_NEW_CURRENT_ATTRIB),
DEFINE_BIT(_NEW_MULTISAMPLE),
DEFINE_BIT(_NEW_TRACK_MATRIX),
DEFINE_BIT(_NEW_PROGRAM),
DEFINE_BIT(_NEW_PROGRAM_CONSTANTS),
- DEFINE_BIT(_NEW_BUFFER_OBJECT),
DEFINE_BIT(_NEW_FRAG_CLAMP),
/* Avoid sign extension problems. */
{(unsigned) _NEW_VARYING_VP_INPUTS, "_NEW_VARYING_VP_INPUTS", 0},
{0, 0, 0}
};
static struct dirty_bit_map brw_bits[] = {
DEFINE_BIT(BRW_NEW_FS_PROG_DATA),
DEFINE_BIT(BRW_NEW_BLORP_BLIT_PROG_DATA),
DEFINE_BIT(BRW_NEW_SF_PROG_DATA),
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e66a3a5..b7cef96 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1572,21 +1572,21 @@ validate_buffer_storage(struct gl_context *ctx,
static void
buffer_storage(struct gl_context *ctx, struct gl_buffer_object *bufObj,
GLenum target, GLsizeiptr size, const GLvoid *data,
GLbitfield flags, const char *func)
{
/* Unmap the existing buffer. We'll replace it now. Not an error. */
_mesa_buffer_unmap_all_mappings(ctx, bufObj);
- FLUSH_VERTICES(ctx, _NEW_BUFFER_OBJECT);
+ FLUSH_VERTICES(ctx, 0);
bufObj->Written = GL_TRUE;
bufObj->Immutable = GL_TRUE;
bufObj->MinMaxCacheDirty = true;
assert(ctx->Driver.BufferData);
if (!ctx->Driver.BufferData(ctx, target, size, data, GL_DYNAMIC_DRAW,
flags, bufObj)) {
if (target == GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD) {
/* Even though the interaction between AMD_pinned_memory and
@@ -1727,21 +1727,21 @@ _mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
}
if (bufObj->Immutable) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(immutable)", func);
return;
}
/* Unmap the existing buffer. We'll replace it now. Not an error. */
_mesa_buffer_unmap_all_mappings(ctx, bufObj);
- FLUSH_VERTICES(ctx, _NEW_BUFFER_OBJECT);
+ FLUSH_VERTICES(ctx, 0);
bufObj->Written = GL_TRUE;
bufObj->MinMaxCacheDirty = true;
#ifdef VBO_DEBUG
printf("glBufferDataARB(%u, sz %ld, from %p, usage 0x%x)\n",
bufObj->Name, size, data, usage);
#endif
#ifdef BOUNDS_CHECK
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 3c4c9f1..d7650cb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2591,22 +2591,21 @@ struct gl_uniform_block
{
/** Declared name of the uniform block */
char *Name;
/** Array of supplemental information about UBO ir_variables. */
struct gl_uniform_buffer_variable *Uniforms;
GLuint NumUniforms;
/**
* Index (GL_UNIFORM_BLOCK_BINDING) into ctx->UniformBufferBindings[] to use
- * with glBindBufferBase to bind a buffer object to this uniform block. When
- * updated in the program, _NEW_BUFFER_OBJECT will be set.
+ * with glBindBufferBase to bind a buffer object to this uniform block.
*/
GLuint Binding;
/**
* Minimum size (in bytes) of a buffer object to back this uniform buffer
* (GL_UNIFORM_BLOCK_DATA_SIZE).
*/
GLuint UniformBufferSize;
/** Stages that reference this block */
@@ -4200,21 +4199,21 @@ struct gl_matrix_stack
#define _NEW_VIEWPORT (1u << 18) /**< gl_context::Viewport */
#define _NEW_TEXTURE_STATE (1u << 19) /**< gl_context::Texture (states only) */
#define _NEW_ARRAY (1u << 20) /**< gl_context::Array */
#define _NEW_RENDERMODE (1u << 21) /**< gl_context::RenderMode, etc */
#define _NEW_BUFFERS (1u << 22) /**< gl_context::Visual, DrawBuffer, */
#define _NEW_CURRENT_ATTRIB (1u << 23) /**< gl_context::Current */
#define _NEW_MULTISAMPLE (1u << 24) /**< gl_context::Multisample */
#define _NEW_TRACK_MATRIX (1u << 25) /**< gl_context::VertexProgram */
#define _NEW_PROGRAM (1u << 26) /**< New program/shader state */
#define _NEW_PROGRAM_CONSTANTS (1u << 27)
-#define _NEW_BUFFER_OBJECT (1u << 28)
+/* gap */
#define _NEW_FRAG_CLAMP (1u << 29)
/* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
#define _NEW_VARYING_VP_INPUTS (1u << 31) /**< gl_context::varying_vp_inputs */
#define _NEW_ALL ~0
/*@}*/
/**
* Composite state flags
*/
--
2.7.4
More information about the mesa-dev
mailing list