diff --git a/meson_options.txt b/meson_options.txt index c95b65415a9..ac9ab64e7a0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -177,13 +177,21 @@ option( ) option( - 'gallium-windows-dll-name', + 'gallium-wgl-dll-name', type : 'string', value : 'libgallium_wgl', - description : 'name of gallium megadriver DLL built for Windows. ' + + description : 'name of gallium wgl target DLL built for Windows. ' + 'defaults to libgallium_wgl.dll to match DRI', ) +option( + 'gallium-d3d10-dll-name', + type : 'string', + value : 'libgallium_d3d10', + description : 'name of gallium d3d10 target DLL built for Windows. ' + + 'defaults to libgallium_d3d10.dll to match DRI', +) + option( 'opencl-spirv', type : 'boolean', diff --git a/src/gallium/targets/d3d10sw/README.md b/src/gallium/targets/d3d10sw/README.md index 7487bb2bc6a..0675f9589e6 100644 --- a/src/gallium/targets/d3d10sw/README.md +++ b/src/gallium/targets/d3d10sw/README.md @@ -1,15 +1,14 @@ -The resulting d3d10sw.dll implements D3D10's software rendering interface, like -WARP. +When compiled with `gallium-driver=llvmpipe` or `gallium-driver=softpipe` the resulting libgallium_d3d10.dll implements D3D10's software rendering interface, like WARP. It can be used directly from WLK 1.6 and WHCK 2.0 D3D10+ tests, via the -Src and -SWDLL options. For example: - wgf11blend.exe -Debug -DoNotCatchExceptions -DXGI:1.1 -FeatureLevel:10.0 -Src:SW -SWDLL:d3d10sw.dll -LogClean -LogVerbose + wgf11blend.exe -Debug -DoNotCatchExceptions -DXGI:1.1 -FeatureLevel:10.0 -Src:SW -SWDLL:libgallium_d3d10.dll -LogClean -LogVerbose However, as of WHCK version 2.1 this mechanism no longer works reliably. Either you use WHCK 2.0 binaries, or you must use the alternative method -cribed below (of copying d3d10sw.dll into the executable directory and rename +described below (of copying libgallium_d3d10.dll into the executable directory and rename it such that it matches the D3D10 UMD of the test machine). @@ -17,7 +16,7 @@ Examples can be easily modified to load it too: D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_SOFTWARE, - LoadLibraryA("d3d10sw"), /* Software */ + LoadLibraryA("libgallium_d3d10"), /* Software */ Flags, D3D10_SDK_VERSION, &SwapChainDesc, @@ -26,7 +25,7 @@ Examples can be easily modified to load it too: D3D11CreateDeviceAndSwapChain(NULL, /* pAdapter */ D3D_DRIVER_TYPE_SOFTWARE, - LoadLibraryA("d3d10sw"), /* Software */ + LoadLibraryA("libgallium_d3d10"), /* Software */ Flags, FeatureLevels, sizeof FeatureLevels / sizeof FeatureLevels[0], diff --git a/src/gallium/targets/d3d10sw/d3d10_sw.def.in b/src/gallium/targets/d3d10sw/d3d10.def.in similarity index 100% rename from src/gallium/targets/d3d10sw/d3d10_sw.def.in rename to src/gallium/targets/d3d10sw/d3d10.def.in diff --git a/src/gallium/targets/d3d10sw/meson.build b/src/gallium/targets/d3d10sw/meson.build index 5fe2f5fa39d..57022550434 100644 --- a/src/gallium/targets/d3d10sw/meson.build +++ b/src/gallium/targets/d3d10sw/meson.build @@ -19,17 +19,18 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -d3d10_sw_def = custom_target( - 'd3d10_sw.def', - input: 'd3d10_sw.def.in', - output : 'd3d10_sw.def', +libgallium_d3d10_def = custom_target( + 'd3d10.def', + input: 'd3d10.def.in', + output : 'd3d10.def', command : gen_vs_module_defs_normal_command, ) -libd3d10sw = shared_library( - 'd3d10sw', +gallium_d3d10_name = get_option('gallium-d3d10-dll-name') +libgallium_d3d10 = shared_library( + gallium_d3d10_name, ['d3d10_gdi.c'], - vs_module_defs : d3d10_sw_def, + vs_module_defs : libgallium_d3d10_def, include_directories : [ inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_d3d10umd, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers, inc_winddk ], @@ -40,20 +41,20 @@ libd3d10sw = shared_library( dependencies : [ dep_ws2_32, idep_nir, driver_swrast ], - name_prefix : '', # otherwise mingw will create libd3d10sw.dll + name_prefix: '', install : true, ) if with_tests test( - 'd3d10sw', + 'd3d10', executable( - 'test_d3d10sw', + 'test_d3d10', files('tests/tri.cpp'), cpp_args : [cpp_msvc_compat_args], dependencies : [cpp.find_library('d3d11')], - link_with : [libd3d10sw], + link_with : [libgallium_d3d10], ), - suite : ['d3d10sw'], + suite : ['d3d10'], ) endif diff --git a/src/gallium/targets/d3d10sw/tests/tri.cpp b/src/gallium/targets/d3d10sw/tests/tri.cpp index d7e95d4db72..da300812771 100644 --- a/src/gallium/targets/d3d10sw/tests/tri.cpp +++ b/src/gallium/targets/d3d10sw/tests/tri.cpp @@ -96,7 +96,7 @@ main(int argc, char *argv[]) D3D_FEATURE_LEVEL_10_0 }; - HMODULE hSoftware = LoadLibraryA("d3d10sw.dll"); + HMODULE hSoftware = LoadLibraryA("libgallium_d3d10.dll"); if (!hSoftware) { return EXIT_FAILURE; } diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build index eaca0aec86b..d48863da4f9 100644 --- a/src/gallium/targets/wgl/meson.build +++ b/src/gallium/targets/wgl/meson.build @@ -28,7 +28,7 @@ wgl_def = custom_target( command : gen_vs_module_defs_normal_command, ) -gallium_wgl_name = get_option('gallium-windows-dll-name') +gallium_wgl_name = get_option('gallium-wgl-dll-name') libgallium_wgl = shared_library( gallium_wgl_name, ['wgl.c'],