[Mesa-dev] [PATCH 01/13] radeonsi: implement GL_ARB_vertex_type_10f_11f_11f_rev

Marek Olšák maraeo at gmail.com
Sun Apr 20 18:59:22 PDT 2014


From: Marek Olšák <marek.olsak at amd.com>

---
 docs/GL3.txt                            | 2 +-
 docs/relnotes/10.2.html                 | 1 +
 src/gallium/drivers/radeonsi/si_state.c | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index 0b663dd..b8557bf 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -188,7 +188,7 @@ GL 4.4:
   GL_ARB_query_buffer_object                           not started
   GL_ARB_texture_mirror_clamp_to_edge                  DONE (i965, nv30, nv50, nvc0, r300, r600, radeonsi, swrast)
   GL_ARB_texture_stencil8                              not started
-  GL_ARB_vertex_type_10f_11f_11f_rev                   DONE (i965, nv50, nvc0, r600)
+  GL_ARB_vertex_type_10f_11f_11f_rev                   DONE (i965, nv50, nvc0, r600, radeonsi)
 
 
 More info about these features and the work involved can be found at
diff --git a/docs/relnotes/10.2.html b/docs/relnotes/10.2.html
index d7d557b..3eedf89 100644
--- a/docs/relnotes/10.2.html
+++ b/docs/relnotes/10.2.html
@@ -47,6 +47,7 @@ Note: some of the new features are only available with certain drivers.
 <li>GL_ARB_buffer_storage on i965, r300, r600, and radeonsi</li>
 <li>GL_ARB_stencil_texturing on i965/gen8+</li>
 <li>GL_ARB_texture_view on i965/gen7</li>
+<li>GL_ARB_vertex_type_10f_11f_11f_rev on radeonsi</li>
 </ul>
 
 
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index ab9c4cc..5e37e5d 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1328,6 +1328,9 @@ static uint32_t si_translate_buffer_dataformat(struct pipe_screen *screen,
 	if (type == UTIL_FORMAT_TYPE_FIXED)
 		return V_008F0C_BUF_DATA_FORMAT_INVALID;
 
+	if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
+		return V_008F0C_BUF_DATA_FORMAT_10_11_11;
+
 	if (desc->nr_channels == 4 &&
 	    desc->channel[0].size == 10 &&
 	    desc->channel[1].size == 10 &&
@@ -1393,6 +1396,9 @@ static uint32_t si_translate_buffer_numformat(struct pipe_screen *screen,
 					      const struct util_format_description *desc,
 					      int first_non_void)
 {
+	if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
+		return V_008F0C_BUF_NUM_FORMAT_FLOAT;
+
 	switch (desc->channel[first_non_void].type) {
 	case UTIL_FORMAT_TYPE_SIGNED:
 		if (desc->channel[first_non_void].normalized)
-- 
1.8.3.2



More information about the mesa-dev mailing list