Module: Mesa Branch: main Commit: f1202a92cfdad6f7b1a9bb4fbffe7019a3a75d18 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1202a92cfdad6f7b1a9bb4fbffe7019a3a75d18
Author: Pavel Ondračka <[email protected]> Date: Mon Apr 11 21:03:25 2022 +0200 nine: check hardware support before using vertex texture Signed-off-by: Pavel Ondračka <[email protected]> Reviewed-by: Emma Anholt <[email protected]> Reviewed-by: Axel Davy <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15864> --- src/gallium/frontends/nine/adapter9.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/nine/adapter9.c b/src/gallium/frontends/nine/adapter9.c index 2097cc1c751..9853ba76ab5 100644 --- a/src/gallium/frontends/nine/adapter9.c +++ b/src/gallium/frontends/nine/adapter9.c @@ -339,6 +339,10 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This, bind |= d3d9_get_pipe_depth_format_bindings(CheckFormat); } + if ((Usage & D3DUSAGE_QUERY_VERTEXTEXTURE) && + !screen->get_shader_param(screen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS)) + return D3DERR_NOTAVAILABLE; + /* API hack because setting RT[0] to NULL is forbidden */ if (CheckFormat == D3DFMT_NULL && bind == PIPE_BIND_RENDER_TARGET && (RType == D3DRTYPE_SURFACE ||
