Henri Verbeet : wined3d: Get rid of the float16 fallback in context_update_stream_info().

Alexandre Julliard julliard at winehq.org
Mon Aug 5 14:58:35 CDT 2019


Module: wine
Branch: master
Commit: 1c41aac4a48b4d189cc19cab72797676d27cc263
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1c41aac4a48b4d189cc19cab72797676d27cc263

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Aug  5 17:57:57 2019 +0430

wined3d: Get rid of the float16 fallback in context_update_stream_info().

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 9ce883d..ea7eaf9 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 cd8bb5e..8103274 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 9f6f470..0394ba6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3744,7 +3744,6 @@ struct wined3d_vertex_declaration
     unsigned int element_count;
 
     BOOL position_transformed;
-    BOOL have_half_floats;
 };
 
 struct wined3d_saved_states




More information about the wine-cvs mailing list