u_vbuf: remove the workaround for half floats and translate
authorMarek Olšák <maraeo@gmail.com>
Sun, 1 Jan 2012 12:05:16 +0000 (13:05 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 5 Jan 2012 17:29:11 +0000 (18:29 +0100)
src/gallium/auxiliary/util/u_vbuf.c

index 5b0e26e30db2939d21efcbf9f09bc080cf1445de..b6681978391ed09b09654e095e5b852483a0914c 100644 (file)
@@ -218,26 +218,7 @@ u_vbuf_translate_begin(struct u_vbuf_priv *mgr,
          continue;
       }
 
-      /* Workaround for translate: output floats instead of halfs. */
-      switch (output_format) {
-      case PIPE_FORMAT_R16_FLOAT:
-         output_format = PIPE_FORMAT_R32_FLOAT;
-         output_format_size = 4;
-         break;
-      case PIPE_FORMAT_R16G16_FLOAT:
-         output_format = PIPE_FORMAT_R32G32_FLOAT;
-         output_format_size = 8;
-         break;
-      case PIPE_FORMAT_R16G16B16_FLOAT:
-         output_format = PIPE_FORMAT_R32G32B32_FLOAT;
-         output_format_size = 12;
-         break;
-      case PIPE_FORMAT_R16G16B16A16_FLOAT:
-         output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
-         output_format_size = 16;
-         break;
-      default:;
-      }
+      assert(translate_is_output_format_supported(output_format));
 
       /* Add this vertex element. */
       te = &key.element[key.nr_elements];