[PATCH v2 2/2] d3d11: Report D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER.

Henri Verbeet hverbeet at gmail.com
Tue Dec 14 06:55:23 CST 2021


On Fri, 10 Dec 2021 at 20:32, Zebediah Figura <zfigura at codeweavers.com> wrote:
>
> This fixes a black screen in The Unfinished Swan.
>
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
> v2: Set the format flag on the wined3d side.
>
>  dlls/d3d11/device.c            | 1 +
>  dlls/d3d11/tests/d3d11.c       | 4 ++--
>  dlls/wined3d/directx.c         | 5 ++++-
>  dlls/wined3d/utils.c           | 4 ++--
>  dlls/wined3d/wined3d_private.h | 1 +
>  5 files changed, 10 insertions(+), 5 deletions(-)
>
Like the previous patch in the series, this causes issues in the
corresponding d3d10core tests.

> @@ -1673,7 +1673,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
>              ARB_TEXTURE_RG,             NULL},
>      {WINED3DFMT_R32_UINT,               GL_R32UI,                         GL_R32UI,                               0,
>              GL_RED_INTEGER,             GL_UNSIGNED_INT,                  0,
> -            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET,
> +            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_INDEX_BUFFER,
>              ARB_TEXTURE_RG,             NULL},
>      {WINED3DFMT_R32_SINT,               GL_R32I,                          GL_R32I,                                0,
>              GL_RED_INTEGER,             GL_INT,                           0,
> @@ -1686,7 +1686,7 @@ static const struct wined3d_format_texture_info format_texture_info[] =
>              ARB_TEXTURE_RG,             NULL},
>      {WINED3DFMT_R16_UINT,               GL_R16UI,                         GL_R16UI,                               0,
>              GL_RED_INTEGER,             GL_UNSIGNED_SHORT,                0,
> -            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET,
> +            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_INDEX_BUFFER,
>              ARB_TEXTURE_RG,             NULL},
>      {WINED3DFMT_R16_SINT,               GL_R16I,                          GL_R16I,                                0,
>              GL_RED_INTEGER,             GL_SHORT,                         0,

I think it's a little ugly to set this flag using the
format_texture_info[] array. Using format_base_flags[] seems more
appropriate, and would have the advantage of working with the Vulkan
backend as well.



More information about the wine-devel mailing list