[Mesa-dev] [PATCH 00/23] ARB_direct_state_access buffer objects (v2)
Martin Peres
martin.peres at free.fr
Thu Feb 12 12:09:00 PST 2015
On 12/02/15 04:05, Laura Ekstrand wrote:
> This includes a v2 of all of the buffer object code plus a v2 of the related
> TextureBufferRange entry point.
>
> Note that some implementations have been merged together (MapBuffer and
> MapBufferRange, for instance) because it didn't seem to make sense to keep two
> separate and nearly identical versions of the same code.
>
> As a reminder:
>
> Most of the implementation work involved abstracting the internals of the
> traditional GL functions and writing the DSA functions on top of these
> abstractions. For instance, to implement GenerateTextureMipmap, most of the
> functionality of GenerateMipmap was moved to a function:
> void
> _mesa_generate_texture_mipmap(struct gl_context *ctx,
> struct gl_texture_object *texObj,
> GLenum target, bool dsa).
> GenerateMipmap and GenerateTextureMipmap
> were then implemented on top of this function as thin layers that get the
> context and the relevant texture object.
Someone commented on my code, stating that internal functions should not
have _mesa_ in their name and I think it makes sense. Do you have an
argument against that?
Other than that, I have adopted the same convention it would seem.
Probably got it from you :)
> One exciting byproduct of the
> creation of these backend abstractions is the potential for driver internals
> (such as meta) to use nameless texture objects. These objects could be
> created, used, and deleted without costly hash table lookups. Moreover, the
> backend abstractions avoid the use of GET_CURRENT_CONTEXT(ctx), allowing
> driver internals to pass in a different context if desired.
>
> For this reason, most of the backend abstractions were exposed to the rest of
> Mesa and given a name of the form _mesa_[DSA_function_name_in_snake_case]. To
> avoid confusion between the backend function names and those of software
> fallbacks, software fallbacks were renamed in the form
> _mesa_[Device_Driver_function_name]_sw.
> For instance, the backend for TexStorage2D
> and TextureStorage2D is named _mesa_texture_storage. To avoid confusion with
> the software fallback _mesa_alloc_texture_storage, the software fallback was
> renamed to _mesa_AllocTextureStorage_sw.
>
> Laura Ekstrand (23):
> main: Fix whitespace in teximage.c.
> main: Add entry point for TextureBufferRange.
> main: Add utility function _mesa_lookup_bufferobj_err.
> main: Tex[ture]Buffer[Range] functions now use
> _mesa_lookup_bufferobj_err.
> main: Add entry point for CreateBuffers.
> main: Add entry point for NamedBufferStorage.
> main: Add entry point for NamedBufferData.
> main: Add entry point for NamedBufferSubData.
> main: Cosmetic changes to BufferSubData infrastructure.
> main: Add entry point for CopyNamedBufferSubData.
> main: Refactor ClearBuffer[Sub]Data.
> main: Add entry points for ClearNamedBuffer[Sub]Data.
> main: Minor whitespace fixes in ClearNamedBuffer[Sub]Data.
> main: Refactor MapBuffer[Range].
> main: Add entry points for MapNamedBuffer[Range].
> main: Add entry point for UnmapNamedBuffer.
> main: Refactor FlushMappedBufferRange.
> main: Add entry point for FlushMappedNamedBufferRange.
> main: Refactor GetBufferParameteri[64]v.
> main: Add entry points for GetBufferParameteri[64]v.
> main: Add entry point for GetNamedBufferPointerv.
> main: Add entry point for glGetNamedBufferSubData.
> main: Cosmetic changes to GetBufferSubData.
>
> src/mapi/glapi/gen/ARB_direct_state_access.xml | 112 +++
> src/mesa/main/bufferobj.c | 1150 +++++++++++++++---------
> src/mesa/main/bufferobj.h | 144 ++-
> src/mesa/main/tests/dispatch_sanity.cpp | 16 +
> src/mesa/main/teximage.c | 120 ++-
> src/mesa/main/teximage.h | 4 +
> src/mesa/state_tracker/st_cb_bufferobjects.c | 4 +-
> 7 files changed, 1094 insertions(+), 456 deletions(-)
>
More information about the mesa-dev
mailing list