Module: wine Branch: master Commit: da9726a16c9a785b86be6a847156192c7c622ce9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=da9726a16c9a785b86be6a847...
Author: Zebediah Figura z.figura12@gmail.com Date: Thu Feb 11 20:33:29 2021 -0600
wined3d: Support WINED3D_RTYPE_BUFFER in wined3d_check_device_format().
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/directx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 5c0998ba54c..c673f61e429 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1781,6 +1781,19 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_3D; break;
+ case WINED3D_RTYPE_BUFFER: + if (wined3d_format_is_typeless(format)) + { + TRACE("Requested WINED3D_RTYPE_BUFFER, but format %s is typeless.\n", debug_d3dformat(check_format_id)); + return WINED3DERR_NOTAVAILABLE; + } + + allowed_usage = WINED3DUSAGE_DYNAMIC; + allowed_bind_flags = WINED3D_BIND_SHADER_RESOURCE + | WINED3D_BIND_UNORDERED_ACCESS; + gl_type = gl_type_end = WINED3D_GL_RES_TYPE_BUFFER; + break; + default: FIXME("Unhandled resource type %s.\n", debug_d3dresourcetype(resource_type)); return WINED3DERR_NOTAVAILABLE;