From 7920adb45caacb7cb72e0a24dcffa52d3b465ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 18 Apr 2014 16:16:44 +0200 Subject: [PATCH] radeonsi: implement GL_ARB_vertex_type_10f_11f_11f_rev MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer --- 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 0b663dd3433..b8557bf4194 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 d7d557bd074..3eedf89755e 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.
  • GL_ARB_buffer_storage on i965, r300, r600, and radeonsi
  • GL_ARB_stencil_texturing on i965/gen8+
  • GL_ARB_texture_view on i965/gen7
  • +
  • GL_ARB_vertex_type_10f_11f_11f_rev on radeonsi
  • diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 921264e78c9..80f54e2b285 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1336,6 +1336,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 && @@ -1401,6 +1404,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) -- 2.30.2