Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mesa
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,903
Issues
1,903
List
Boards
Labels
Milestones
Merge Requests
318
Merge Requests
318
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mesa
mesa
Commits
e3385eb0
Commit
e3385eb0
authored
Nov 05, 2019
by
Pierre-Eric Pelloux-Prayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mesa: add ARB_clear_buffer_object named functions
Reviewed-by:
Marek Olšák
<
marek.olsak@amd.com
>
parent
442fd3d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
9 deletions
+54
-9
docs/features.txt
docs/features.txt
+1
-1
src/mapi/glapi/gen/ARB_clear_buffer_object.xml
src/mapi/glapi/gen/ARB_clear_buffer_object.xml
+2
-3
src/mapi/glapi/gen/static_data.py
src/mapi/glapi/gen/static_data.py
+5
-3
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.c
+33
-0
src/mesa/main/bufferobj.h
src/mesa/main/bufferobj.h
+11
-0
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/tests/dispatch_sanity.cpp
+2
-2
No files found.
docs/features.txt
View file @
e3385eb0
...
...
@@ -377,7 +377,7 @@ GL_EXT_direct_state_access additions from other extensions (complete list):
GL_AMD_gpu_shader_int64 n/a (not enabled in compat profile)
GL_ARB_bindless_texture DONE
GL_ARB_buffer_storage DONE
GL_ARB_clear_buffer_object
not started
GL_ARB_clear_buffer_object
DONE
GL_ARB_framebuffer_no_attachments DONE
GL_ARB_gpu_shader_fp64 not started
GL_ARB_instanced_arrays not started
...
...
src/mapi/glapi/gen/ARB_clear_buffer_object.xml
View file @
e3385eb0
...
...
@@ -26,7 +26,7 @@
<param
name=
"data"
type=
"const GLvoid *"
/>
</function>
<!--
<function name="ClearNamedBufferDataEXT">
<function
name=
"ClearNamedBufferDataEXT"
>
<param
name=
"buffer"
type=
"GLuint"
/>
<param
name=
"internalformat"
type=
"GLenum"
/>
<param
name=
"format"
type=
"GLenum"
/>
...
...
@@ -34,7 +34,6 @@
<param
name=
"data"
type=
"const GLvoid *"
/>
</function>
<function
name=
"ClearNamedBufferSubDataEXT"
>
<param
name=
"buffer"
type=
"GLuint"
/>
<param
name=
"internalformat"
type=
"GLenum"
/>
...
...
@@ -43,7 +42,7 @@
<param
name=
"format"
type=
"GLenum"
/>
<param
name=
"type"
type=
"GLenum"
/>
<param
name=
"data"
type=
"const GLvoid *"
/>
</function>
-->
</function>
</category>
...
...
src/mapi/glapi/gen/static_data.py
View file @
e3385eb0
...
...
@@ -1616,9 +1616,11 @@ offsets = {
"GetVertexArrayPointervEXT"
:
1580
,
"GetVertexArrayIntegeri_vEXT"
:
1581
,
"GetVertexArrayPointeri_vEXT"
:
1582
,
"NamedFramebufferParameteriEXT"
:
1583
,
"GetNamedFramebufferParameterivEXT"
:
1584
,
"VertexArrayVertexAttribLOffsetEXT"
:
1585
,
"ClearNamedBufferDataEXT"
:
1583
,
"ClearNamedBufferSubDataEXT"
:
1584
,
"NamedFramebufferParameteriEXT"
:
1585
,
"GetNamedFramebufferParameterivEXT"
:
1586
,
"VertexArrayVertexAttribLOffsetEXT"
:
1587
,
}
functions
=
[
...
...
src/mesa/main/bufferobj.c
View file @
e3385eb0
...
...
@@ -2573,6 +2573,22 @@ _mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
}
void
GLAPIENTRY
_mesa_ClearNamedBufferDataEXT
(
GLuint
buffer
,
GLenum
internalformat
,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
)
{
GET_CURRENT_CONTEXT
(
ctx
);
struct
gl_buffer_object
*
bufObj
=
_mesa_lookup_bufferobj
(
ctx
,
buffer
);
if
(
!
_mesa_handle_bind_buffer_gen
(
ctx
,
buffer
,
&
bufObj
,
"glClearNamedBufferDataEXT"
))
return
;
clear_buffer_sub_data_error
(
ctx
,
bufObj
,
internalformat
,
0
,
bufObj
->
Size
,
format
,
type
,
data
,
"glClearNamedBufferDataEXT"
,
false
);
}
void
GLAPIENTRY
_mesa_ClearBufferSubData_no_error
(
GLenum
target
,
GLenum
internalformat
,
GLintptr
offset
,
GLsizeiptr
size
,
...
...
@@ -2641,6 +2657,23 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
true
);
}
void
GLAPIENTRY
_mesa_ClearNamedBufferSubDataEXT
(
GLuint
buffer
,
GLenum
internalformat
,
GLintptr
offset
,
GLsizeiptr
size
,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
)
{
GET_CURRENT_CONTEXT
(
ctx
);
struct
gl_buffer_object
*
bufObj
=
_mesa_lookup_bufferobj
(
ctx
,
buffer
);
if
(
!
_mesa_handle_bind_buffer_gen
(
ctx
,
buffer
,
&
bufObj
,
"glClearNamedBufferSubDataEXT"
))
return
;
clear_buffer_sub_data_error
(
ctx
,
bufObj
,
internalformat
,
offset
,
size
,
format
,
type
,
data
,
"glClearNamedBufferSubDataEXT"
,
true
);
}
static
GLboolean
unmap_buffer
(
struct
gl_context
*
ctx
,
struct
gl_buffer_object
*
bufObj
)
{
...
...
src/mesa/main/bufferobj.h
View file @
e3385eb0
...
...
@@ -277,6 +277,11 @@ _mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
);
void
GLAPIENTRY
_mesa_ClearNamedBufferDataEXT
(
GLuint
buffer
,
GLenum
internalformat
,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
);
void
GLAPIENTRY
_mesa_ClearBufferSubData_no_error
(
GLenum
target
,
GLenum
internalformat
,
GLintptr
offset
,
GLsizeiptr
size
,
...
...
@@ -301,6 +306,12 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
);
void
GLAPIENTRY
_mesa_ClearNamedBufferSubDataEXT
(
GLuint
buffer
,
GLenum
internalformat
,
GLintptr
offset
,
GLsizeiptr
size
,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
);
GLboolean
GLAPIENTRY
_mesa_UnmapBuffer_no_error
(
GLenum
target
);
GLboolean
GLAPIENTRY
...
...
src/mesa/main/tests/dispatch_sanity.cpp
View file @
e3385eb0
...
...
@@ -858,8 +858,8 @@ const struct function common_desktop_functions_possible[] = {
{
"glTextureStorage3DEXT"
,
43
,
-
1
},
{
"glClearBufferData"
,
43
,
-
1
},
{
"glClearBufferSubData"
,
43
,
-
1
},
// { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml
// { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml
{
"glClearNamedBufferDataEXT"
,
43
,
-
1
},
{
"glClearNamedBufferSubDataEXT"
,
43
,
-
1
},
{
"glCopyImageSubData"
,
43
,
-
1
},
{
"glTextureView"
,
43
,
-
1
},
{
"glBindVertexBuffer"
,
43
,
-
1
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment