nine: strange color or transparency of trees when called DrawIndexedPrimitive?
System information
$ inxi -GSC -xx
System:
Host: mono Kernel: 5.15.0-60-generic x86_64 bits: 64 compiler: gcc
v: 11.3.0 Desktop: LXQt 1.2.0 tk: Qt 5.15.3 wm: Openbox dm: SDDM
Distro: Ubuntu 22.04.2 LTS (Jammy Jellyfish)
CPU:
Info: quad core model: AMD A6-5200 APU with Radeon HD Graphics bits: 64
type: MCP arch: Jaguar rev: 1 cache: L1: 256 KiB L2: 2 MiB
Speed (MHz): avg: 798 high: 799 min/max: 800/2000 boost: disabled cores:
1: 798 2: 798 3: 799 4: 798 bogomips: 15970
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Kabini [Radeon HD 8400 / R3 Series] vendor: Samsung Co
driver: amdgpu v: kernel ports: active: DVI-D-1 empty: HDMI-A-1
bus-ID: 00:01.0 chip-ID: 1002:9830
Device-2: Silicon Motion WebCam SC-10IRR13340N type: USB driver: uvcvideo
bus-ID: 2-3:3 chip-ID: 2232:1055
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: amdgpu,ati
unloaded: fbdev,modesetting,vesa gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96
Monitor-1: DVI-D-0 mapped: DVI-D-1 model: SAMSUNG-AIO res: 1920x1080
dpi: 305 diag: 595mm (23.4")
OpenGL: renderer: AMD Radeon HD 8400 / R3 Series (kabini LLVM 15.0.6 DRM
3.42 5.15.0-60-generic)
v: 4.6 Mesa 23.1.0-devel (git-96ba034 2023-02-20 jammy-oibaf-ppa)
direct render: Yes
Describe the issue
I got strange color or transparency of trees in game "Sea Dogs: To Each His Own". It has open source engine, so I added support Nine and DXVK Native support.
This is trees, when I'm using Nine from git: 96ba0344 This is trees, when I'm using DXVK.
I'm almost sure that error happens when I call DrawIndexedPrimitive
in this line:
https://github.com/q4a/storm-engine/blob/e764793fdf8b2c49b3c2ecba3e380d6bac81ee3e/src/libs/renderer/src/s_device.cpp#L2299
Regression
I don't think, that it's regression. I tested old version Mesa on Mali GPU and got same problem.
Log files as attachment
I'm not sure, if it's possible to got apitrace in Linux for d3d9, because of error: unsupported API
: https://github.com/apitrace/apitrace/blob/decf6376cecc164da2f15c8fa895d96286f20c10/cli/cli_trace.cpp#L121
#ifdef _WIN32
case trace::API_D3D7:
wrapperFilename = "ddraw.dll";
break;
case trace::API_D3D8:
wrapperFilename = "d3d8.dll";
break;
case trace::API_D3D9:
wrapperFilename = "d3d9.dll";
break;
case trace::API_DXGI:
wrapperFilename = "dxgitrace.dll";
useInject = true;
break;
case trace::API_D2D1:
wrapperFilename = "d2d1trace.dll";
useInject = true;
break;
#endif
default:
std::cerr << "error: unsupported API\n";
I'd like to try and fix it with your help/direction: what's the best thing to do - try to get the apitrace in Wine or just debug when code goes to mesa?
- apitrace from Windows: storm.trace.7z