D3D11 FL9_3: Fix bug in R32F vertex format emulation.

We would allow direct storage when this format is emulated. Noticed
this when making a test which used a single float vertex format.

BUG=angleproject:1635

Change-Id: Ia2164b0f311b27f24b6aa7760eb9f9a3834c6044
Reviewed-on: https://chromium-review.googlesource.com/451578
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index c631349..c574494 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -80,13 +80,19 @@
     // 4-byte boundary, whichever is smaller. (Undocumented, and experimentally confirmed)
     size_t alignment = 4;
 
+    // TODO(jmadill): add VertexFormatCaps
+    BufferFactoryD3D *factory = bufferD3D->getFactory();
+
+    gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib);
+
+    // CPU-converted vertex data must be converted (naturally).
+    if ((factory->getVertexConversionType(vertexFormatType) & VERTEX_CONVERT_CPU) != 0)
+    {
+        return false;
+    }
+
     if (attrib.type != GL_FLOAT)
     {
-        gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib);
-
-        // TODO(jmadill): add VertexFormatCaps
-        BufferFactoryD3D *factory = bufferD3D->getFactory();
-
         auto errorOrElementSize = factory->getVertexSpaceRequired(attrib, binding, 1, 0);
         if (errorOrElementSize.isError())
         {
@@ -95,12 +101,6 @@
         }
 
         alignment = std::min<size_t>(errorOrElementSize.getResult(), 4);
-
-        // CPU-converted vertex data must be converted (naturally).
-        if ((factory->getVertexConversionType(vertexFormatType) & VERTEX_CONVERT_CPU) != 0)
-        {
-            return false;
-        }
     }
 
     GLintptr offset = ComputeVertexAttributeOffset(attrib, binding);