[PATCH 4/5] wined3d: Get rid of the float16 fallback in context_update_stream_info().

Henri Verbeet hverbeet at codeweavers.com
Mon Aug 5 08:09:57 CDT 2019


This is never used, since we reject creation of vertex declarations that
contain any elements with unsupported formats.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/wined3d/context.c           | 11 +----------
 dlls/wined3d/vertexdeclaration.c |  5 -----
 dlls/wined3d/wined3d_private.h   |  1 -
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 9ce883d9631..ea7eaf9911c 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3601,7 +3601,6 @@ static void context_update_stream_info(struct wined3d_context *context, const st
 {
     struct wined3d_stream_info *stream_info = &context->stream_info;
     const struct wined3d_d3d_info *d3d_info = context->d3d_info;
-    const struct wined3d_gl_info *gl_info = context->gl_info;
     DWORD prev_all_vbo = stream_info->all_vbo;
     unsigned int i;
     WORD map;
@@ -3664,15 +3663,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
     if (stream_info->all_vbo)
         return;
 
-    if (use_vs(state))
-    {
-        if (state->vertex_declaration->have_half_floats && !gl_info->supported[ARB_HALF_FLOAT_VERTEX])
-        {
-            TRACE("Using immediate mode draw with vertex shaders for FLOAT16 conversion.\n");
-            context->use_immediate_mode_draw = TRUE;
-        }
-    }
-    else
+    if (!use_vs(state))
     {
         WORD slow_mask = -!d3d_info->ffp_generic_attributes & (1u << WINED3D_FFP_PSIZE);
         slow_mask |= -(!d3d_info->vertex_bgra && !d3d_info->ffp_generic_attributes)
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
index cd8bb5e4233..81032745a06 100644
--- a/dlls/wined3d/vertexdeclaration.c
+++ b/dlls/wined3d/vertexdeclaration.c
@@ -251,11 +251,6 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
             heap_free(declaration->elements);
             return E_FAIL;
         }
-
-        if (elements[i].format == WINED3DFMT_R16G16_FLOAT || elements[i].format == WINED3DFMT_R16G16B16A16_FLOAT)
-        {
-            declaration->have_half_floats = TRUE;
-        }
     }
 
     return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c9a234872fb..782d91da772 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3740,7 +3740,6 @@ struct wined3d_vertex_declaration
     unsigned int element_count;
 
     BOOL position_transformed;
-    BOOL have_half_floats;
 };
 
 struct wined3d_saved_states
-- 
2.11.0




More information about the wine-devel mailing list