Closed lorn10 closed 2 years ago
That is right indeed, Nine doesn't seem to handle D3DUSAGE_QUERY_VERTEXTEXTURE.
I didn't know it was possible to support vs 3 without supporting vertex textures, but it seems that dx9 ATI hardware did do that. Now the question is whether it is sufficient or not to support the check, or if we also have to return a compilation error for invalid shaders.
Thanks for the informative reply. Maybe @ondracka has some ideas what will be here the "right" thing to do.
It should be noted that even NVIDIA DX9 SM3.0 class hardware didn't support all the common vertex texture formats, so the problem exist there too. I quote:
[NVIDIA] dx9 SM3 (6&7 series): only R32F & A32B32G32R32F supported for 2D and no filtering, CUBE or VOL texture support
More information can be found at the Chromium VTF page.
PS By the way, there was some progress regarding the "black rendering" issue on RV530 hardware and Gallium Nine. The "black rendering" is not present when the RADEON_DEBUG=notcl
option is used, this forces software rendering for vertex shaders. But there are compared to WineD3D still some rendering corruptions present which have currently an unclear origin.:wink:
Would it be difficult to just return false for any CheckDeviceFormat with D3DUSAGE_QUERY_VERTEXTEXTURE when PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 0 for PIPE_SHADER_VERTEX or something like that? I could do some testing if needed.
That said I'm not 100% sure that this leads to some real issues in the Sactuary benchmark, but I have another app: Anno 1404, where nine generates TXL opcode in a vertex shader, so I can test with that.
Yes, that's exactly that. Sorry I didn't have time to send you a patch to test (some computer update issues, and lack of time), but that would be basically that.
There is a MR at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15864 with that there is no more "Found optional Vertex texture fetch" reported. There is still a ton of other issues though, so don't expect nine to work with Unigine Sanctuary on r300 anytime soon :-(
Really great, this VTF issue seems to be resolved, many thanks @ondracka and @axeldavy! :+1: Closing this issue now.
This bug report targets a feature called Vertex texture fetch (VTF) which is currently exposed for D3D applications in conjunction with Gallium Nine also on R500 based hardware.
According to the information available, this shouldn't be the case regarding a Radeon X1600 or any pre DX10 class ATI/AMD GPU. The Khronos "Vertex texture fetch" OpenGL Wiki page notes regarding this:
A good example to demonstrate that wrong behavior is Unigine Sanctuary. It clearly lists Vertex texture fetch as available.
Note, this issue is present also in WineD3D, see bug 52625. Initially it was assumed that this was a bug in Mesa, see Mesa bug 6053. However, it was confirmed by Wine developer Stefan Dösinger that this is most likely WineD3D related. So this bug exist as well there. :wink: