Commit 51bbfa5c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Allow 32 bpc UINT formats in vertex declarations.

parent 9ab603b0
......@@ -4692,6 +4692,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
position_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func;
position_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func;
position_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func;
position_funcs[WINED3D_FFP_EMIT_INVALID] = invalid_func;
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func;
......@@ -4710,6 +4711,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
diffuse_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func;
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func;
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func;
diffuse_funcs[WINED3D_FFP_EMIT_INVALID] = invalid_func;
/* No 4 component entry points here */
specular_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
......@@ -4744,6 +4746,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
specular_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func;
specular_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func;
specular_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func;
specular_funcs[WINED3D_FFP_EMIT_INVALID] = invalid_func;
/* Only 3 component entry points here. Test how others behave. Float4 normals are used
* by one of our tests, trying to pass it to the pixel shader, which fails on Windows.
......@@ -4765,6 +4768,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
normal_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func;
normal_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func;
normal_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func;
normal_funcs[WINED3D_FFP_EMIT_INVALID] = invalid_func;
multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT1] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord1fvARB);
multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2fvARB);
......@@ -4790,6 +4794,7 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_texcoord_func;
multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_texcoord_func;
}
multi_texcoord_funcs[WINED3D_FFP_EMIT_INVALID] = invalid_texcoord_func;
}
static void wined3d_adapter_init_fb_cfgs(struct wined3d_adapter *adapter, HDC dc)
......
......@@ -120,6 +120,9 @@ static const struct wined3d_format_channels formats[] =
{WINED3DFMT_VERTEXDATA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{WINED3DFMT_R16_UINT, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
{WINED3DFMT_R32_UINT, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0},
{WINED3DFMT_R32G32_UINT, 32, 32, 0, 0, 0, 32, 0, 0, 8, 0, 0},
{WINED3DFMT_R32G32B32_UINT, 32, 32, 32, 0, 0, 32, 64, 0, 12, 0, 0},
{WINED3DFMT_R32G32B32A32_UINT, 32, 32, 32, 32, 0, 32, 64, 96, 16, 0, 0},
{WINED3DFMT_R16G16B16A16_SNORM, 16, 16, 16, 16, 0, 16, 32, 48, 8, 0, 0},
/* Vendor-specific formats */
{WINED3DFMT_ATI2N, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
......@@ -218,7 +221,11 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
{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_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)},
{WINED3DFMT_R32_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_INT, 1, GL_FALSE, sizeof(UINT)},
{WINED3DFMT_R32G32_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_INT, 2, GL_FALSE, sizeof(UINT)},
{WINED3DFMT_R32G32B32_UINT, WINED3D_FFP_EMIT_INVALID, 3, GL_UNSIGNED_INT, 3, GL_FALSE, sizeof(UINT)},
{WINED3DFMT_R32G32B32A32_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT, 4, GL_FALSE, sizeof(UINT)},
};
struct wined3d_format_texture_info
......
......@@ -901,7 +901,8 @@ enum wined3d_ffp_emit_idx
WINED3D_FFP_EMIT_DEC3N = 14,
WINED3D_FFP_EMIT_FLOAT16_2 = 15,
WINED3D_FFP_EMIT_FLOAT16_4 = 16,
WINED3D_FFP_EMIT_COUNT = 17
WINED3D_FFP_EMIT_INVALID = 17,
WINED3D_FFP_EMIT_COUNT = 18
};
struct wined3d_bo_address
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment