[PATCH 6/7] wined3d: Inverse logic for applying half float vertex format fixups.
Józef Kucia
jkucia at codeweavers.com
Sun May 22 17:41:56 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
Prep work for the next patch in the series.
---
dlls/wined3d/utils.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 3c00d1c..bc08f41 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -340,8 +340,8 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
{WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N, 4, GL_UNSIGNED_SHORT, 4, GL_TRUE, sizeof(short int)},
{WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, 3, GL_FALSE, sizeof(short int)},
{WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, 3, GL_TRUE, sizeof(short int)},
- {WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_FLOAT, 2, GL_FALSE, sizeof(GLhalfNV)},
- {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)},
+ {WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_HALF_FLOAT, 2, GL_FALSE, sizeof(GLhalfNV)},
+ {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_HALF_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)},
{WINED3DFMT_R8G8B8A8_SNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, 4, GL_TRUE, sizeof(BYTE)},
{WINED3DFMT_R8G8B8A8_SINT, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, 4, GL_FALSE, sizeof(BYTE)},
{WINED3DFMT_R16G16B16A16_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_SHORT, 4, GL_FALSE, sizeof(short int)},
@@ -2977,15 +2977,15 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_
gl_info->formats[idx].gl_vtx_format = GL_BGRA;
}
- if (gl_info->supported[ARB_HALF_FLOAT_VERTEX])
+ if (!gl_info->supported[ARB_HALF_FLOAT_VERTEX])
{
/* Do not change the size of the type, it is CPU side. We have to change the GPU-side information though.
* It is the job of the vertex buffer code to make sure that the vbos have the right format */
idx = get_format_idx(WINED3DFMT_R16G16_FLOAT);
- gl_info->formats[idx].gl_vtx_type = GL_HALF_FLOAT; /* == GL_HALF_FLOAT_NV */
+ gl_info->formats[idx].gl_vtx_type = GL_FLOAT;
idx = get_format_idx(WINED3DFMT_R16G16B16A16_FLOAT);
- gl_info->formats[idx].gl_vtx_type = GL_HALF_FLOAT;
+ gl_info->formats[idx].gl_vtx_type = GL_FLOAT;
}
if (!gl_info->supported[ARB_HALF_FLOAT_PIXEL])
--
2.7.3
More information about the wine-patches
mailing list