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
a0d66703
Commit
a0d66703
authored
Nov 06, 2019
by
Pierre-Eric Pelloux-Prayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mesa: add ARB_texture_buffer_range glTextureBufferRangeEXT function
Reviewed-by:
Marek Olšák
<
marek.olsak@amd.com
>
parent
b78e2a19
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
2 deletions
+62
-2
docs/features.txt
docs/features.txt
+1
-1
src/mapi/glapi/gen/ARB_texture_buffer_range.xml
src/mapi/glapi/gen/ARB_texture_buffer_range.xml
+9
-0
src/mapi/glapi/gen/static_data.py
src/mapi/glapi/gen/static_data.py
+1
-0
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/tests/dispatch_sanity.cpp
+1
-1
src/mesa/main/teximage.c
src/mesa/main/teximage.c
+46
-0
src/mesa/main/teximage.h
src/mesa/main/teximage.h
+4
-0
No files found.
docs/features.txt
View file @
a0d66703
...
...
@@ -384,7 +384,7 @@ GL_EXT_direct_state_access additions from other extensions (complete list):
GL_ARB_internalformat_query2 DONE
GL_ARB_sparse_texture n/a
GL_ARB_sparse_buffer not started
GL_ARB_texture_buffer_range
not started
GL_ARB_texture_buffer_range
DONE
GL_ARB_texture_storage DONE
GL_ARB_texture_storage_multisample not started
GL_ARB_vertex_attrib_64bit DONE
...
...
src/mapi/glapi/gen/ARB_texture_buffer_range.xml
View file @
a0d66703
...
...
@@ -17,6 +17,15 @@
<param
name=
"size"
type=
"GLsizeiptr"
/>
</function>
<function
name=
"TextureBufferRangeEXT"
>
<param
name=
"texture"
type=
"GLuint"
/>
<param
name=
"target"
type=
"GLenum"
/>
<param
name=
"internalformat"
type=
"GLenum"
/>
<param
name=
"buffer"
type=
"GLuint"
/>
<param
name=
"offset"
type=
"GLintptr"
/>
<param
name=
"size"
type=
"GLsizeiptr"
/>
</function>
</category>
</OpenGLAPI>
src/mapi/glapi/gen/static_data.py
View file @
a0d66703
...
...
@@ -1622,6 +1622,7 @@ offsets = {
"GetNamedFramebufferParameterivEXT"
:
1586
,
"VertexArrayVertexAttribLOffsetEXT"
:
1587
,
"VertexArrayVertexAttribDivisorEXT"
:
1588
,
"TextureBufferRangeEXT"
:
1589
,
}
functions
=
[
...
...
src/mesa/main/tests/dispatch_sanity.cpp
View file @
a0d66703
...
...
@@ -894,7 +894,7 @@ const struct function common_desktop_functions_possible[] = {
{
"glGetProgramResourceLocation"
,
43
,
-
1
},
{
"glGetProgramResourceLocationIndex"
,
43
,
-
1
},
{
"glShaderStorageBlockBinding"
,
43
,
-
1
},
// { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml
{
"glTextureBufferRangeEXT"
,
43
,
-
1
},
{
"glTexStorage2DMultisample"
,
43
,
-
1
},
{
"glTexStorage3DMultisample"
,
43
,
-
1
},
// { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml
...
...
src/mesa/main/teximage.c
View file @
a0d66703
...
...
@@ -6401,6 +6401,52 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
offset
,
size
,
"glTexBufferRange"
);
}
/** GL_ARB_texture_buffer_range + GL_EXT_direct_state_access */
void
GLAPIENTRY
_mesa_TextureBufferRangeEXT
(
GLuint
texture
,
GLenum
target
,
GLenum
internalFormat
,
GLuint
buffer
,
GLintptr
offset
,
GLsizeiptr
size
)
{
struct
gl_texture_object
*
texObj
;
struct
gl_buffer_object
*
bufObj
;
GET_CURRENT_CONTEXT
(
ctx
);
texObj
=
_mesa_lookup_or_create_texture
(
ctx
,
target
,
texture
,
false
,
true
,
"glTextureBufferRangeEXT"
);
if
(
!
texObj
)
return
;
if
(
!
check_texture_buffer_target
(
ctx
,
target
,
"glTextureBufferRangeEXT"
))
return
;
if
(
buffer
)
{
bufObj
=
_mesa_lookup_bufferobj_err
(
ctx
,
buffer
,
"glTextureBufferRangeEXT"
);
if
(
!
bufObj
)
return
;
if
(
!
check_texture_buffer_range
(
ctx
,
bufObj
,
offset
,
size
,
"glTextureBufferRangeEXT"
))
return
;
}
else
{
/* OpenGL 4.5 core spec (02.02.2015) says in Section 8.9 Buffer
* Textures (PDF page 254):
* "If buffer is zero, then any buffer object attached to the buffer
* texture is detached, the values offset and size are ignored and
* the state for offset and size for the buffer texture are reset to
* zero."
*/
offset
=
0
;
size
=
0
;
bufObj
=
NULL
;
}
texture_buffer_range
(
ctx
,
texObj
,
internalFormat
,
bufObj
,
offset
,
size
,
"glTextureBufferRangeEXT"
);
}
void
GLAPIENTRY
_mesa_TextureBuffer
(
GLuint
texture
,
GLenum
internalFormat
,
GLuint
buffer
)
{
...
...
src/mesa/main/teximage.h
View file @
a0d66703
...
...
@@ -784,6 +784,10 @@ extern void GLAPIENTRY
_mesa_TexBufferRange
(
GLenum
target
,
GLenum
internalFormat
,
GLuint
buffer
,
GLintptr
offset
,
GLsizeiptr
size
);
extern
void
GLAPIENTRY
_mesa_TextureBufferRangeEXT
(
GLuint
texture
,
GLenum
target
,
GLenum
internalFormat
,
GLuint
buffer
,
GLintptr
offset
,
GLsizeiptr
size
);
extern
void
GLAPIENTRY
_mesa_TextureBuffer
(
GLuint
texture
,
GLenum
internalFormat
,
GLuint
buffer
);
...
...
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