mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
d3d12: Remove more nir dependencies when with_gallium_d3d12_graphics disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
This commit is contained in:
parent
27829d7ffe
commit
2ff18b2757
4 changed files with 19 additions and 5 deletions
|
|
@ -670,7 +670,9 @@ d3d12_destroy_screen(struct d3d12_screen *screen)
|
||||||
|
|
||||||
if (screen->d3d12_mod)
|
if (screen->d3d12_mod)
|
||||||
util_dl_close(screen->d3d12_mod);
|
util_dl_close(screen->d3d12_mod);
|
||||||
|
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
glsl_type_singleton_decref();
|
glsl_type_singleton_decref();
|
||||||
|
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
FREE(screen);
|
FREE(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1248,7 +1250,9 @@ d3d12_query_memory_info(struct pipe_screen *pscreen, struct pipe_memory_info *in
|
||||||
bool
|
bool
|
||||||
d3d12_init_screen_base(struct d3d12_screen *screen, struct sw_winsys *winsys, LUID *adapter_luid)
|
d3d12_init_screen_base(struct d3d12_screen *screen, struct sw_winsys *winsys, LUID *adapter_luid)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
glsl_type_singleton_init_or_ref();
|
glsl_type_singleton_init_or_ref();
|
||||||
|
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
d3d12_debug = static_cast<uint32_t>(debug_get_option_d3d12_debug());
|
d3d12_debug = static_cast<uint32_t>(debug_get_option_d3d12_debug());
|
||||||
|
|
||||||
screen->winsys = winsys;
|
screen->winsys = winsys;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,11 @@
|
||||||
#include "util/slab.h"
|
#include "util/slab.h"
|
||||||
#include "d3d12_descriptor_pool.h"
|
#include "d3d12_descriptor_pool.h"
|
||||||
|
|
||||||
#include "nir.h"
|
#include "util/list.h"
|
||||||
|
#include "util/set.h"
|
||||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
|
#include "compiler/glsl_types.h"
|
||||||
|
#include "nir.h"
|
||||||
#include "dxil_versions.h"
|
#include "dxil_versions.h"
|
||||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
|
|
||||||
|
|
@ -122,6 +125,7 @@ struct d3d12_screen {
|
||||||
D3D_FEATURE_LEVEL max_feature_level;
|
D3D_FEATURE_LEVEL max_feature_level;
|
||||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
enum dxil_shader_model max_shader_model;
|
enum dxil_shader_model max_shader_model;
|
||||||
|
nir_shader_compiler_options nir_options;
|
||||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||||
D3D12_FEATURE_DATA_ARCHITECTURE architecture;
|
D3D12_FEATURE_DATA_ARCHITECTURE architecture;
|
||||||
D3D12_FEATURE_DATA_D3D12_OPTIONS opts;
|
D3D12_FEATURE_DATA_D3D12_OPTIONS opts;
|
||||||
|
|
@ -135,8 +139,6 @@ struct d3d12_screen {
|
||||||
D3D12_FEATURE_DATA_D3D12_OPTIONS19 opts19;
|
D3D12_FEATURE_DATA_D3D12_OPTIONS19 opts19;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nir_shader_compiler_options nir_options;
|
|
||||||
|
|
||||||
/* description */
|
/* description */
|
||||||
uint32_t vendor_id;
|
uint32_t vendor_id;
|
||||||
uint32_t device_id;
|
uint32_t device_id;
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,9 @@ if is_xbox == false
|
||||||
files_libd3d12 += files('d3d12_dxcore_screen.cpp')
|
files_libd3d12 += files('d3d12_dxcore_screen.cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libd3d12_deps = [idep_nir_headers, dep_dxheaders, idep_mesautil]
|
libd3d12_deps = [dep_dxheaders, idep_mesautil]
|
||||||
if with_gallium_d3d12_graphics
|
if with_gallium_d3d12_graphics
|
||||||
libd3d12_deps += [idep_libdxil_compiler]
|
libd3d12_deps += [idep_nir_headers, idep_libdxil_compiler]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libd3d12 = static_library(
|
libd3d12 = static_library(
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,20 @@ else
|
||||||
files_libd3d12winsys += files('d3d12_wgl_framebuffer.cpp')
|
files_libd3d12winsys += files('d3d12_wgl_framebuffer.cpp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
libd3d12wgl_compiler_args = []
|
||||||
|
_with_gallium_d3d12_graphics = get_option('gallium-d3d12-graphics')
|
||||||
|
if not _with_gallium_d3d12_graphics.disabled()
|
||||||
|
libd3d12wgl_compiler_args += '-DHAVE_GALLIUM_D3D12_GRAPHICS'
|
||||||
|
endif
|
||||||
|
|
||||||
libd3d12winsys = static_library(
|
libd3d12winsys = static_library(
|
||||||
'd3d12winsys',
|
'd3d12winsys',
|
||||||
files_libd3d12winsys,
|
files_libd3d12winsys,
|
||||||
include_directories : [inc_src, inc_wgl, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers],
|
include_directories : [inc_src, inc_wgl, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers],
|
||||||
dependencies : [dep_dxheaders, idep_nir_headers, idep_libdxil_compiler, idep_mesautil],
|
dependencies : [dep_dxheaders, idep_nir_headers, idep_libdxil_compiler, idep_mesautil],
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
|
c_args: libd3d12wgl_compiler_args,
|
||||||
|
cpp_args: libd3d12wgl_compiler_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
winsys_d3d12_wgl = declare_dependency(
|
winsys_d3d12_wgl = declare_dependency(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue