OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
shader_compile_test Namespace Reference

Functions

 main ()

Variables

 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
str DEFAULT_CLIENT = 'build/check-linux/cod2_linux'
int MIN_SHADERS = 150
tuple ALLOWED_FAILURES = ('distortion.hlsl',)
int TIMEOUT = 300

Detailed Description

The Linux client on real Direct3D 9 compiles the game's shaders and draws.

    python3 scripts/shader_compile_test.py /path/to/CoD2 [--binary PATH] [--keep DIR]

Starts cod2_linux (on DXVK, the default) on its own game of mp_toujane with
REALD3D9_SHLOG=1, which logs each shader compilation, and VKD3DX_SELFTEST=1,
which compiles a shader that includes a file the game lacks first. A config
file takes a screenshot (TGA) once the map is up, then quits. Exits with 0
when at least MIN_SHADERS distinct shaders compile, none fails but
distortion.hlsl (it wants USE_FLOAT_Z, which the Windows path does not define
either), the self-test fails as it should, the screenshot is not one flat
colour, and the client leaves no crash report. Under WSL Vulkan is llvmpipe,
on the processor: the map takes a while. The client opens a window and needs
a CD key in ~/.cod2/preferences; without one the test is skipped (exit 0).

Function Documentation

◆ main()

shader_compile_test.main ( )

Variable Documentation

◆ ALLOWED_FAILURES

tuple shader_compile_test.ALLOWED_FAILURES = ('distortion.hlsl',)

◆ DEFAULT_CLIENT

str shader_compile_test.DEFAULT_CLIENT = 'build/check-linux/cod2_linux'

◆ MIN_SHADERS

int shader_compile_test.MIN_SHADERS = 150

◆ ROOT

shader_compile_test.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

◆ TIMEOUT

int shader_compile_test.TIMEOUT = 300