d3d12: Do not build microsoft/compiler when graphics, gl or vk disabled
Reviewed-By: Pohsiang Hsu <pohhsu@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34844>
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
#include "d3d12_descriptor_pool.h"
|
||||
#include "d3d12_pipeline_state.h"
|
||||
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "dxil_nir_lower_int_samplers.h"
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
@@ -24,8 +24,14 @@
|
||||
#include "d3d12_blit.h"
|
||||
#include "d3d12_cmd_signature.h"
|
||||
#include "d3d12_context.h"
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "d3d12_compiler.h"
|
||||
#include "d3d12_compute_transforms.h"
|
||||
#include "nir_to_dxil.h"
|
||||
#ifdef _WIN32
|
||||
#include "dxil_validator.h"
|
||||
#endif
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "d3d12_debug.h"
|
||||
#include "d3d12_fence.h"
|
||||
#include "d3d12_format.h"
|
||||
@@ -52,16 +58,9 @@
|
||||
#include "util/u_pstipple.h"
|
||||
#include "util/u_sample_positions.h"
|
||||
#include "util/u_dl.h"
|
||||
#include "nir_to_dxil.h"
|
||||
|
||||
#include <dxguids/dxguids.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "dxil_validator.h"
|
||||
#endif
|
||||
|
||||
static void
|
||||
d3d12_context_destroy(struct pipe_context *pctx)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "d3d12_context.h"
|
||||
#include "d3d12_compiler.h"
|
||||
#include "d3d12_debug.h"
|
||||
#include "d3d12_format.h"
|
||||
#include "d3d12_query.h"
|
||||
@@ -32,9 +31,6 @@
|
||||
#include "util/u_blitter.h"
|
||||
#include "util/format/u_format.h"
|
||||
|
||||
#include "nir_to_dxil.h"
|
||||
#include "nir_builder.h"
|
||||
|
||||
static void
|
||||
copy_buffer_region_no_barriers(struct d3d12_context *ctx,
|
||||
struct d3d12_resource *dst,
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
#include "d3d12_screen.h"
|
||||
|
||||
#include "d3d12_bufmgr.h"
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "d3d12_compiler.h"
|
||||
#include "d3d12_nir_passes.h"
|
||||
#include "nir.h"
|
||||
#include "nir_to_dxil.h"
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "d3d12_context.h"
|
||||
#include "d3d12_debug.h"
|
||||
#include "d3d12_fence.h"
|
||||
@@ -35,8 +40,6 @@
|
||||
#include "d3d12_interop_public.h"
|
||||
#include "d3d12_residency.h"
|
||||
#include "d3d12_resource.h"
|
||||
#include "d3d12_nir_passes.h"
|
||||
|
||||
#include "pipebuffer/pb_bufmgr.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_math.h"
|
||||
@@ -45,10 +48,8 @@
|
||||
#include "util/u_dl.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
|
||||
#include "nir.h"
|
||||
#include "frontend/sw_winsys.h"
|
||||
|
||||
#include "nir_to_dxil.h"
|
||||
#include "git_sha1.h"
|
||||
|
||||
#ifndef _GAMING_XBOX
|
||||
@@ -427,8 +428,10 @@ d3d12_init_screen_caps(struct d3d12_screen *screen)
|
||||
caps->max_line_width =
|
||||
caps->max_line_width_aa = 1.0f; /* no clue */
|
||||
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
caps->max_point_size =
|
||||
caps->max_point_size_aa = D3D12_MAX_POINT_SIZE;
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
|
||||
caps->max_texture_anisotropy = D3D12_MAX_MAXANISOTROPY;
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
#include "d3d12_descriptor_pool.h"
|
||||
|
||||
#include "nir.h"
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
#include "dxil_versions.h"
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
|
||||
#include "d3d12_common.h"
|
||||
|
||||
@@ -118,7 +120,9 @@ struct d3d12_screen {
|
||||
|
||||
/* capabilities */
|
||||
D3D_FEATURE_LEVEL max_feature_level;
|
||||
#ifdef HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
enum dxil_shader_model max_shader_model;
|
||||
#endif // HAVE_GALLIUM_D3D12_GRAPHICS
|
||||
D3D12_FEATURE_DATA_ARCHITECTURE architecture;
|
||||
D3D12_FEATURE_DATA_D3D12_OPTIONS opts;
|
||||
D3D12_FEATURE_DATA_D3D12_OPTIONS1 opts1;
|
||||
|
||||
@@ -148,12 +148,17 @@ if is_xbox == false
|
||||
files_libd3d12 += files('d3d12_dxcore_screen.cpp')
|
||||
endif
|
||||
|
||||
libd3d12_deps = [idep_nir_headers, dep_dxheaders, idep_mesautil]
|
||||
if with_gallium_d3d12_graphics
|
||||
libd3d12_deps += [idep_libdxil_compiler]
|
||||
endif
|
||||
|
||||
libd3d12 = static_library(
|
||||
'd3d12',
|
||||
[files_libd3d12, sha1_h],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies: [idep_nir_headers, idep_libdxil_compiler, dep_dxheaders, idep_mesautil],
|
||||
dependencies: libd3d12_deps,
|
||||
c_args: libd3d12_compiler_args,
|
||||
cpp_args: libd3d12_compiler_args,
|
||||
)
|
||||
|
||||
+12
-10
@@ -1,13 +1,15 @@
|
||||
# Copyright © Microsoft Corporation
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
subdir('compiler')
|
||||
if with_microsoft_clc
|
||||
subdir('clc')
|
||||
endif
|
||||
if with_spirv_to_dxil or with_microsoft_vk
|
||||
subdir('spirv_to_dxil')
|
||||
endif
|
||||
if with_microsoft_vk
|
||||
subdir('vulkan')
|
||||
endif
|
||||
if with_microsoft_clc or with_spirv_to_dxil or with_microsoft_vk or (with_gallium_d3d12 and not get_option('gallium-d3d12-graphics').disabled())
|
||||
subdir('compiler')
|
||||
if with_microsoft_clc
|
||||
subdir('clc')
|
||||
endif
|
||||
if with_spirv_to_dxil or with_microsoft_vk
|
||||
subdir('spirv_to_dxil')
|
||||
endif
|
||||
if with_microsoft_vk
|
||||
subdir('vulkan')
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user