[Mesa-dev] [PATCH v2 16/17] radeonsi: Enable OpenGL 3.3

Michel Dänzer michel at daenzer.net
Tue Jan 28 01:45:20 PST 2014


From: Michel Dänzer <michel.daenzer at amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---

v2:
* Drop excessive HAVE_LLVM preprocessor guards
* Update docs/GL3.txt

 docs/GL3.txt                           | 36 +++++++++++++++++-----------------
 src/gallium/drivers/radeonsi/si_pipe.c |  8 +++++---
 2 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 2dc3569..6d6fe71 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -63,35 +63,35 @@ GL 3.1 --- all DONE: i965, nv50, nvc0, r600, radeonsi
   Signed normalized textures (GL_EXT_texture_snorm)     DONE (r300)
 
 
-GL 3.2 --- all DONE: i965, nv50, nvc0
+GL 3.2 --- all DONE: i965, nv50, nvc0, radeonsi
 
   Core/compatibility profiles                           DONE
   GLSL 1.50                                             DONE ()
   Geometry shaders                                      DONE ()
-  BGRA vertex order (GL_ARB_vertex_array_bgra)          DONE (r300, r600, radeonsi, swrast)
-  Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (r300, r600, radeonsi, swrast)
-  Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (r300, r600, radeonsi, swrast)
-  Provoking vertex (GL_ARB_provoking_vertex)            DONE (r300, r600, radeonsi, swrast)
-  Seamless cubemaps (GL_ARB_seamless_cube_map)          DONE (r600, radeonsi)
-  Multisample textures (GL_ARB_texture_multisample)     DONE (r600, radeonsi)
-  Frag depth clamp (GL_ARB_depth_clamp)                 DONE (r600, swrast, radeonsi)
-  Fence objects (GL_ARB_sync)                           DONE (r300, r600, radeonsi, swrast)
+  BGRA vertex order (GL_ARB_vertex_array_bgra)          DONE (r300, r600, swrast)
+  Base vertex offset(GL_ARB_draw_elements_base_vertex)  DONE (r300, r600, swrast)
+  Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (r300, r600, swrast)
+  Provoking vertex (GL_ARB_provoking_vertex)            DONE (r300, r600, swrast)
+  Seamless cubemaps (GL_ARB_seamless_cube_map)          DONE (r600)
+  Multisample textures (GL_ARB_texture_multisample)     DONE (r600)
+  Frag depth clamp (GL_ARB_depth_clamp)                 DONE (r600, swrast)
+  Fence objects (GL_ARB_sync)                           DONE (r300, r600, swrast)
   GLX_ARB_create_context_profile                        DONE
 
 
-GL 3.3 --- all DONE: i965, nv50, nvc0
+GL 3.3 --- all DONE: i965, nv50, nvc0, radeonsi
 
   GLSL 3.30                                             DONE ()
-  GL_ARB_blend_func_extended                            DONE (r600, radeonsi, softpipe)
+  GL_ARB_blend_func_extended                            DONE (r600, softpipe)
   GL_ARB_explicit_attrib_location                       DONE (all drivers that support GLSL)
-  GL_ARB_occlusion_query2                               DONE (r300, r600, radeonsi, swrast)
+  GL_ARB_occlusion_query2                               DONE (r300, r600, swrast)
   GL_ARB_sampler_objects                                DONE (all drivers)
-  GL_ARB_shader_bit_encoding                            DONE (r600, radeonsi)
-  GL_ARB_texture_rgb10_a2ui                             DONE (r600, radeonsi)
-  GL_ARB_texture_swizzle                                DONE (r300, r600, radeonsi, swrast)
-  GL_ARB_timer_query                                    DONE (r600, radeonsi)
-  GL_ARB_instanced_arrays                               DONE (r300, r600, radeonsi)
-  GL_ARB_vertex_type_2_10_10_10_rev                     DONE (r600, radeonsi)
+  GL_ARB_shader_bit_encoding                            DONE (r600)
+  GL_ARB_texture_rgb10_a2ui                             DONE (r600)
+  GL_ARB_texture_swizzle                                DONE (r300, r600, swrast)
+  GL_ARB_timer_query                                    DONE (r600)
+  GL_ARB_instanced_arrays                               DONE (r300, r600)
+  GL_ARB_vertex_type_2_10_10_10_rev                     DONE (r600)
 
 
 GL 4.0:
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 768b84d..01e93ba 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -269,7 +269,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 		return 256;
 
 	case PIPE_CAP_GLSL_FEATURE_LEVEL:
-		return 140;
+		return HAVE_LLVM >= 0x0305 ? 330 : 140;
 
 	case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
 		return 1;
@@ -307,7 +307,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
 		return 16384;
 	case PIPE_CAP_MAX_COMBINED_SAMPLERS:
-		return 32;
+		return HAVE_LLVM >= 0x0305 ? 48: 32;
 
 	/* Render targets. */
 	case PIPE_CAP_MAX_RENDER_TARGETS:
@@ -340,8 +340,10 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
 	case PIPE_SHADER_VERTEX:
 		break;
 	case PIPE_SHADER_GEOMETRY:
-		/* TODO: support and enable geometry programs */
+#if HAVE_LLVM < 0x0305
 		return 0;
+#endif
+		break;
 	case PIPE_SHADER_COMPUTE:
 		switch (param) {
 		case PIPE_SHADER_CAP_PREFERRED_IR:
-- 
1.8.5.3



More information about the mesa-dev mailing list