radeonsi: implement GL_ARB_vertex_type_10f_11f_11f_rev
authorMarek Olšák <marek.olsak@amd.com>
Fri, 18 Apr 2014 14:16:44 +0000 (16:16 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 24 Apr 2014 23:33:12 +0000 (01:33 +0200)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
docs/GL3.txt
docs/relnotes/10.2.html
src/gallium/drivers/radeonsi/si_state.c

index 0b663dd3433c04eb214db6d3add233ab23095acc..b8557bf4194f05192b9a9781c03c110ed60bd7b5 100644 (file)
@@ -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
index d7d557bd074c9f667fbfe8924df2078c50ebb961..3eedf89755eb2295b1056a2ced0e940bd2bd5494 100644 (file)
@@ -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>
 
 
index 921264e78c9f32a8086c8707a4722eff21ef842b..80f54e2b285b935f6d2334c9ef6d22eaf37f9a67 100644 (file)
@@ -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)