summaryrefslogtreecommitdiff
path: root/src/mapi
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2024-01-07 23:34:07 -0500
committerMarge Bot <emma+marge@anholt.net>2024-02-23 18:03:58 +0000
commit5e5d91671e03bcf14133dcd4ff79b376eb70ecc9 (patch)
treecd3de8e7dafbb51c48c6fe57b161a1870947645f /src/mapi
parent99f8f01dfb97e44e144ec0c91d80494e969c2464 (diff)
glthread: rewrite glDrawElements call packing
Since changing 2 fields to 8 bits and the removal of cmd_size, call sizes have decreased by 4 bytes, so we have 4 unused bytes in most DrawElements structures. So far we have used these calls for all DrawElements variants: - DrawElementsBaseVertex - DrawElementsInstanced - DrawElementsInstancedBaseVertexBaseInstance - DrawElementsInstancedBaseVertexBaseInstanceDrawID Change them to these by either removing 4 more bytes or adding 4 bytes, so that we don't waste space. - DrawElements - DrawElementsInstancedBaseVertex - DrawElementsInstancedBaseInstance - DrawElementsInstancedBaseVertexBaseInstanceDrawID This decreases the size of 1 frame in glthread batches by 12% in Viewperf2020/Catia1. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
Diffstat (limited to 'src/mapi')
-rw-r--r--src/mapi/glapi/gen/ARB_base_instance.xml4
-rw-r--r--src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml4
-rw-r--r--src/mapi/glapi/gen/ARB_draw_instanced.xml2
-rw-r--r--src/mapi/glapi/gen/gl_API.xml12
4 files changed, 15 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/ARB_base_instance.xml b/src/mapi/glapi/gen/ARB_base_instance.xml
index 768b1447870..7e8ec3b2ecf 100644
--- a/src/mapi/glapi/gen/ARB_base_instance.xml
+++ b/src/mapi/glapi/gen/ARB_base_instance.xml
@@ -18,7 +18,7 @@
</function>
<function name="DrawElementsInstancedBaseInstance" marshal="custom" exec="dlist"
- marshal_no_error="true">
+ marshal_no_error="true" marshal_struct="public">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
@@ -28,7 +28,7 @@
</function>
<function name="DrawElementsInstancedBaseVertexBaseInstance" marshal="custom" exec="dlist"
- marshal_struct="public" marshal_no_error="true">
+ marshal_no_error="true">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
index a7353c544ff..27ea26ba60a 100644
--- a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
+++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
@@ -9,7 +9,7 @@
<category name="GL_ARB_draw_elements_base_vertex" number="62">
<function name="DrawElementsBaseVertex" es2="3.2" marshal="custom" exec="dlist"
- marshal_struct="public" marshal_no_error="true">
+ marshal_no_error="true">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
@@ -38,7 +38,7 @@
</function>
<function name="DrawElementsInstancedBaseVertex" es2="2.0" marshal="custom" exec="dlist"
- marshal_no_error="true">
+ marshal_no_error="true" marshal_struct="public">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml
index cadf9f53846..d43f1039798 100644
--- a/src/mapi/glapi/gen/ARB_draw_instanced.xml
+++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml
@@ -17,7 +17,7 @@
</function>
<function name="DrawElementsInstanced" marshal="custom" exec="dlist" es2="2.0"
- marshal_struct="public" marshal_no_error="true">
+ marshal_no_error="true">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index ca141aa2bfc..73b3240be7a 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -3219,7 +3219,7 @@
</function>
<function name="DrawElements" es1="1.0" es2="2.0" marshal="custom" exec="dlist"
- marshal_no_error="true">
+ marshal_no_error="true" marshal_struct="public">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
@@ -12962,7 +12962,15 @@
</function>
<function name="DrawElementsInstancedBaseVertexBaseInstanceDrawID"
- es1="1.0" es2="2.0" marshal="custom">
+ es1="1.0" es2="2.0" marshal="custom" marshal_struct="public">
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ <param name="instance_count" type="GLsizei"/>
+ <param name="basevertex" type="GLint"/>
+ <param name="baseinstance" type="GLuint"/>
+ <param name="drawid" type="GLuint"/>
</function>
<!-- Internal function for glthread to implement ancillary buffer invalidation. -->