Mesa (master): radeonsi: enable multi-draw related pipe caps

Nicolai Hähnle nh at kemper.freedesktop.org
Tue Aug 9 13:57:15 UTC 2016


Module: Mesa
Branch: master
Commit: e4cb3af524cb02ec7cd23a64da033cfb7193a3cb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4cb3af524cb02ec7cd23a64da033cfb7193a3cb

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Jul 28 17:01:54 2016 +0100

radeonsi: enable multi-draw related pipe caps

This enables GL_shader_draw_parameters and GL_ARB_indirect_parameters as well
as a properly accelerated implementation of GL_ARB_multi_draw_indirect.

Enabling the feature requires a sufficiently uptodate firmware -- those have
already been released a long time ago, although this does mean that the
feature only works with the amdgpu kernel module, since the radeon module
doesn't have a way to query the firmware version.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 docs/GL3.txt                           | 4 ++--
 docs/relnotes/12.1.0.html              | 2 ++
 src/gallium/drivers/radeonsi/si_pipe.c | 8 +++++---
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index c185c69..0ba5a25 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -283,7 +283,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
   GL_ARB_ES3_2_compatibility                            not started
   GL_ARB_fragment_shader_interlock                      not started
   GL_ARB_gpu_shader_int64                               started (airlied for core and Gallium, idr for i965)
-  GL_ARB_indirect_parameters                            DONE (nvc0)
+  GL_ARB_indirect_parameters                            DONE (nvc0, radeonsi)
   GL_ARB_parallel_shader_compile                        not started, but Chia-I Wu did some related work in 2014
   GL_ARB_pipeline_statistics_query                      DONE (i965, nvc0, radeonsi, softpipe, swr)
   GL_ARB_post_depth_coverage                            not started
@@ -293,7 +293,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve
   GL_ARB_shader_atomic_counter_ops                      DONE (nvc0, radeonsi, softpipe)
   GL_ARB_shader_ballot                                  not started
   GL_ARB_shader_clock                                   DONE (i965/gen7+)
-  GL_ARB_shader_draw_parameters                         DONE (i965, nvc0)
+  GL_ARB_shader_draw_parameters                         DONE (i965, nvc0, radeonsi)
   GL_ARB_shader_group_vote                              DONE (nvc0)
   GL_ARB_shader_stencil_export                          DONE (i965/gen9+, radeonsi, softpipe, llvmpipe, swr)
   GL_ARB_shader_viewport_layer_array                    not started
diff --git a/docs/relnotes/12.1.0.html b/docs/relnotes/12.1.0.html
index 3935bb0..1204038 100644
--- a/docs/relnotes/12.1.0.html
+++ b/docs/relnotes/12.1.0.html
@@ -45,6 +45,8 @@ Note: some of the new features are only available with certain drivers.
 
 <ul>
 <li>GL_ARB_enhanced_layouts on i965</li>
+<li>GL_ARB_indirect_parameters on radeonsi</li>
+<li>GL_ARB_shader_draw_parameters on radeonsi</li>
 <li>GL_ARB_shader_group_vote on nvc0</li>
 <li>GL_ARB_ES3_1_compatibility on i965</li>
 <li>GL_EXT_window_rectangles on nv50, nvc0</li>
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index ffeeda3..86d7632 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -435,9 +435,6 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
 	case PIPE_CAP_VERTEXID_NOBASE:
 	case PIPE_CAP_CLEAR_TEXTURE:
-	case PIPE_CAP_DRAW_PARAMETERS:
-	case PIPE_CAP_MULTI_DRAW_INDIRECT:
-	case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
 	case PIPE_CAP_QUERY_BUFFER_OBJECT:
 	case PIPE_CAP_CULL_DISTANCE:
 	case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
@@ -445,6 +442,11 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_MAX_WINDOW_RECTANGLES:
 		return 0;
 
+	case PIPE_CAP_DRAW_PARAMETERS:
+	case PIPE_CAP_MULTI_DRAW_INDIRECT:
+	case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
+		return sscreen->has_draw_indirect_multi;
+
 	case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
 		return 30;
 




More information about the mesa-commit mailing list