diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 19f0e3f5715..52fda4c89bc 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -36,7 +36,6 @@ #include "util/format/u_format.h" #include "util/u_debug.h" #include "frontend/drm_driver.h" -#include "state_tracker/st_cb_bufferobjects.h" #include "state_tracker/st_cb_fbo.h" #include "state_tracker/st_cb_texture.h" #include "state_tracker/st_texture.h" diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 512d2227738..1d54cf89950 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -50,7 +50,6 @@ #include "api_exec_decl.h" #include "util/set.h" -#include "state_tracker/st_cb_bufferobjects.h" #include "state_tracker/st_cb_memoryobjects.h" #include "state_tracker/st_debug.h" diff --git a/src/mesa/meson.build b/src/mesa/meson.build index 6d0f897dfe5..e22b74fc5dc 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -330,8 +330,6 @@ files_libmesa = files( 'state_tracker/st_cb_bitmap_shader.c', 'state_tracker/st_cb_blit.c', 'state_tracker/st_cb_blit.h', - 'state_tracker/st_cb_bufferobjects.c', - 'state_tracker/st_cb_bufferobjects.h', 'state_tracker/st_cb_clear.c', 'state_tracker/st_cb_clear.h', 'state_tracker/st_cb_compute.c', diff --git a/src/mesa/state_tracker/st_atom_array.cpp b/src/mesa/state_tracker/st_atom_array.cpp index 077d808ae3b..018f303e4d7 100644 --- a/src/mesa/state_tracker/st_atom_array.cpp +++ b/src/mesa/state_tracker/st_atom_array.cpp @@ -38,7 +38,6 @@ #include "st_context.h" #include "st_atom.h" -#include "st_cb_bufferobjects.h" #include "st_draw.h" #include "st_program.h" diff --git a/src/mesa/state_tracker/st_atom_atomicbuf.c b/src/mesa/state_tracker/st_atom_atomicbuf.c index 11dbc563e11..eec2f871afe 100644 --- a/src/mesa/state_tracker/st_atom_atomicbuf.c +++ b/src/mesa/state_tracker/st_atom_atomicbuf.c @@ -35,7 +35,6 @@ #include "util/u_surface.h" #include "st_debug.h" -#include "st_cb_bufferobjects.h" #include "st_context.h" #include "st_atom.h" #include "st_program.h" diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index a41d5a6436c..52e33f49743 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -47,7 +47,6 @@ #include "st_atom.h" #include "st_atom_constbuf.h" #include "st_program.h" -#include "st_cb_bufferobjects.h" /* Unbinds the CB0 if it's not used by the current program to avoid leaving * dangling pointers to old (potentially deleted) shaders in the driver. diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index 320f195dd71..aad84febcf4 100644 --- a/src/mesa/state_tracker/st_atom_image.c +++ b/src/mesa/state_tracker/st_atom_image.c @@ -36,7 +36,6 @@ #include "util/u_surface.h" #include "cso_cache/cso_context.h" -#include "st_cb_bufferobjects.h" #include "st_cb_texture.h" #include "st_debug.h" #include "st_texture.h" diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index 68c7745f383..39169650957 100644 --- a/src/mesa/state_tracker/st_atom_storagebuf.c +++ b/src/mesa/state_tracker/st_atom_storagebuf.c @@ -35,7 +35,6 @@ #include "util/u_surface.h" #include "st_debug.h" -#include "st_cb_bufferobjects.h" #include "st_context.h" #include "st_atom.h" #include "st_program.h" diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c deleted file mode 100644 index 8af8e8d8a9d..00000000000 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * Functions for pixel buffer objects and vertex/element buffer objects. - */ - - -#include /* for PRId64 macro */ - -#include "main/errors.h" - -#include "main/mtypes.h" -#include "main/arrayobj.h" -#include "main/bufferobj.h" - -#include "st_context.h" -#include "st_cb_bufferobjects.h" -#include "st_cb_memoryobjects.h" -#include "st_debug.h" -#include "st_util.h" - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" - - -/** - * Called via glInvalidateBuffer(Sub)Data. - */ -static void -st_bufferobj_invalidate(struct gl_context *ctx, - struct gl_buffer_object *obj, - GLintptr offset, - GLsizeiptr size) -{ - struct pipe_context *pipe = ctx->pipe; - - /* We ignore partial invalidates. */ - if (offset != 0 || size != obj->Size) - return; - - /* If the buffer is mapped, we can't invalidate it. */ - if (!obj->buffer || _mesa_bufferobj_mapped(obj, MAP_USER)) - return; - - pipe->invalidate_resource(pipe, obj->buffer); -} - -void -st_init_bufferobject_functions(struct pipe_screen *screen, - struct dd_function_table *functions) -{ - if (screen->get_param(screen, PIPE_CAP_INVALIDATE_BUFFER)) - functions->InvalidateBufferSubData = st_bufferobj_invalidate; -} diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.h b/src/mesa/state_tracker/st_cb_bufferobjects.h deleted file mode 100644 index 3c39fd04f26..00000000000 --- a/src/mesa/state_tracker/st_cb_bufferobjects.h +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************************** - * - * Copyright 2005 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef ST_CB_BUFFEROBJECTS_H -#define ST_CB_BUFFEROBJECTS_H - -#include "main/mtypes.h" - -struct dd_function_table; -struct pipe_resource; -struct pipe_screen; -struct st_context; - -enum pipe_map_flags -st_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer); - - -extern void -st_init_bufferobject_functions(struct pipe_screen *screen, - struct dd_function_table *functions); - -#endif diff --git a/src/mesa/state_tracker/st_cb_compute.c b/src/mesa/state_tracker/st_cb_compute.c index 815bec9086e..ea6d893f9ee 100644 --- a/src/mesa/state_tracker/st_cb_compute.c +++ b/src/mesa/state_tracker/st_cb_compute.c @@ -29,7 +29,6 @@ #include "st_atom.h" #include "st_context.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_cb_compute.h" #include "st_util.h" diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 01f6be88a45..2c101b847a4 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -48,7 +48,6 @@ #include "pipe/p_screen.h" #include "st_atom.h" #include "st_context.h" -#include "st_cb_bufferobjects.h" #include "st_cb_fbo.h" #include "st_cb_flush.h" #include "st_cb_texture.h" diff --git a/src/mesa/state_tracker/st_cb_fbo.h b/src/mesa/state_tracker/st_cb_fbo.h index 684daef5d16..3f698bebaff 100644 --- a/src/mesa/state_tracker/st_cb_fbo.h +++ b/src/mesa/state_tracker/st_cb_fbo.h @@ -29,9 +29,9 @@ #ifndef ST_CB_FBO_H #define ST_CB_FBO_H -#include "main/fbobject.h" #include "main/glheader.h" #include "main/mtypes.h" +#include "main/fbobject.h" #include "pipe/p_compiler.h" #include "pipe/p_format.h" diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c index 7161886b965..72714e2689e 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.c +++ b/src/mesa/state_tracker/st_cb_queryobj.c @@ -44,7 +44,6 @@ #include "st_context.h" #include "st_cb_queryobj.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_util.h" diff --git a/src/mesa/state_tracker/st_cb_semaphoreobjects.c b/src/mesa/state_tracker/st_cb_semaphoreobjects.c index e44161aeea2..7b433a9f91c 100644 --- a/src/mesa/state_tracker/st_cb_semaphoreobjects.c +++ b/src/mesa/state_tracker/st_cb_semaphoreobjects.c @@ -31,7 +31,6 @@ #include "st_texture.h" #include "st_util.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_cb_semaphoreobjects.h" #include "frontend/drm_driver.h" diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 72d22ca0d7f..2b9ef69cdad 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -55,7 +55,6 @@ #include "state_tracker/st_cb_fbo.h" #include "state_tracker/st_cb_flush.h" #include "state_tracker/st_cb_texture.h" -#include "state_tracker/st_cb_bufferobjects.h" #include "state_tracker/st_cb_memoryobjects.h" #include "state_tracker/st_format.h" #include "state_tracker/st_pbo.h" diff --git a/src/mesa/state_tracker/st_cb_texture.h b/src/mesa/state_tracker/st_cb_texture.h index 04588f50879..d6fdd713394 100644 --- a/src/mesa/state_tracker/st_cb_texture.h +++ b/src/mesa/state_tracker/st_cb_texture.h @@ -38,6 +38,10 @@ struct gl_texture_object; struct pipe_context; struct st_context; struct st_texture_object; +struct gl_renderbuffer; +struct gl_pixelstore_attrib; +struct gl_memory_object; +struct gl_sampler_object; extern enum pipe_texture_target gl_target_to_pipe(GLenum target); diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c index 77ec17ff94f..d3eeceb544f 100644 --- a/src/mesa/state_tracker/st_cb_xformfb.c +++ b/src/mesa/state_tracker/st_cb_xformfb.c @@ -39,7 +39,6 @@ #include "main/transformfeedback.h" #include "util/u_memory.h" -#include "st_cb_bufferobjects.h" #include "st_cb_xformfb.h" #include "st_context.h" diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index f522dc3268f..7f0ec42de2f 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -41,7 +41,6 @@ #include "st_context.h" #include "st_debug.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_cb_clear.h" #include "st_cb_compute.h" #include "st_cb_condrender.h" @@ -918,7 +917,6 @@ st_init_driver_functions(struct pipe_screen *screen, bool has_egl_image_validate) { st_init_draw_functions(screen, functions); - st_init_bufferobject_functions(screen, functions); st_init_eglimage_functions(functions, has_egl_image_validate); diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index ac37f111fd3..ad46f27d7e7 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -50,7 +50,6 @@ #include "st_context.h" #include "st_atom.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_cb_xformfb.h" #include "st_debug.h" #include "st_draw.h" diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index a215f34a747..bdc40a1e258 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -36,7 +36,6 @@ #include "st_context.h" #include "st_atom.h" #include "st_cb_bitmap.h" -#include "st_cb_bufferobjects.h" #include "st_draw.h" #include "st_program.h" #include "st_util.h" diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 7b702ee7cfe..936e4fffd8f 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -31,7 +31,6 @@ #include "state_tracker/st_context.h" #include "state_tracker/st_nir.h" #include "state_tracker/st_pbo.h" -#include "state_tracker/st_cb_bufferobjects.h" #include "main/context.h" #include "pipe/p_context.h" diff --git a/src/mesa/state_tracker/st_sampler_view.c b/src/mesa/state_tracker/st_sampler_view.c index ea603295eea..8ee17b7649e 100644 --- a/src/mesa/state_tracker/st_sampler_view.c +++ b/src/mesa/state_tracker/st_sampler_view.c @@ -38,7 +38,6 @@ #include "st_sampler_view.h" #include "st_texture.h" #include "st_format.h" -#include "st_cb_bufferobjects.h" #include "st_cb_texture.h" /* Subtract remaining private references. Typically used before