summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci/build/gitlab-ci.yml1
-rw-r--r--meson.build8
-rw-r--r--src/amd/common/ac_binary.c2
-rw-r--r--src/amd/common/ac_rgp.c6
-rw-r--r--src/amd/common/meson.build11
-rw-r--r--src/amd/vulkan/radv_shader.c18
-rw-r--r--subprojects/libelf.wrap6
7 files changed, 37 insertions, 15 deletions
diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml
index 75f7500cad3..9e49814df3a 100644
--- a/.gitlab-ci/build/gitlab-ci.yml
+++ b/.gitlab-ci/build/gitlab-ci.yml
@@ -613,6 +613,7 @@ debian-mingw32-x86_64:
GALLIUM_ST: >
-D gallium-opencl=icd
-D gallium-rusticl=false
+ -D opencl-native=false
-D opencl-spirv=true
-D microsoft-clc=enabled
-D static-libclc=all
diff --git a/meson.build b/meson.build
index 6250de545fd..eb419e410f5 100644
--- a/meson.build
+++ b/meson.build
@@ -1908,12 +1908,8 @@ with_opencl_native = _opencl != 'disabled' and get_option('opencl-native')
if (with_amd_vk or with_gallium_radeonsi or
(with_gallium_opencl and with_opencl_native) or
(with_gallium_r600 and with_llvm))
- if with_platform_windows
- dep_elf = dependency('libelf', required : false, fallback : ['libelf', 'libelf_dep'])
- else
- dep_elf = dependency('libelf', required : false)
- endif
- if not dep_elf.found()
+ dep_elf = dependency('libelf', required : false)
+ if not with_platform_windows and not dep_elf.found()
dep_elf = cc.find_library('elf')
endif
else
diff --git a/src/amd/common/ac_binary.c b/src/amd/common/ac_binary.c
index 96c83fa8a71..a22392efb48 100644
--- a/src/amd/common/ac_binary.c
+++ b/src/amd/common/ac_binary.c
@@ -27,8 +27,10 @@
#include "util/u_math.h"
#include "util/u_memory.h"
+#ifndef _WIN32
#include <gelf.h>
#include <libelf.h>
+#endif
#include <sid.h>
#include <stdio.h>
diff --git a/src/amd/common/ac_rgp.c b/src/amd/common/ac_rgp.c
index 9321a03b5f3..31f236940da 100644
--- a/src/amd/common/ac_rgp.c
+++ b/src/amd/common/ac_rgp.c
@@ -965,6 +965,7 @@ static void ac_sqtt_dump_spm(const struct ac_spm_trace_data *spm_trace,
fseek(output, file_offset, SEEK_SET);
}
+#ifndef _WIN32
static void ac_sqtt_dump_data(struct radeon_info *rad_info,
struct ac_thread_trace *thread_trace,
const struct ac_spm_trace_data *spm_trace,
@@ -1151,11 +1152,15 @@ static void ac_sqtt_dump_data(struct radeon_info *rad_info,
ac_sqtt_dump_spm(spm_trace, file_offset, output);
}
}
+#endif
int ac_dump_rgp_capture(struct radeon_info *info,
struct ac_thread_trace *thread_trace,
const struct ac_spm_trace_data *spm_trace)
{
+#ifdef _WIN32
+ return -1;
+#else
char filename[2048];
struct tm now;
time_t t;
@@ -1178,4 +1183,5 @@ int ac_dump_rgp_capture(struct radeon_info *info,
fclose(f);
return 0;
+#endif
}
diff --git a/src/amd/common/meson.build b/src/amd/common/meson.build
index 1d72ce7f0f1..10c120b05b5 100644
--- a/src/amd/common/meson.build
+++ b/src/amd/common/meson.build
@@ -73,8 +73,6 @@ amd_common_files = files(
'ac_shader_util.h',
'ac_gpu_info.c',
'ac_gpu_info.h',
- 'ac_rtld.c',
- 'ac_rtld.h',
'ac_surface.c',
'ac_surface.h',
'ac_debug.c',
@@ -89,7 +87,6 @@ amd_common_files = files(
'ac_rgp.h',
'ac_msgpack.c',
'ac_msgpack.h',
- 'ac_rgp_elf_object_pack.c',
'ac_nir.c',
'ac_nir.h',
'ac_nir_opt_outputs.c',
@@ -105,6 +102,14 @@ amd_common_files = files(
'ac_perfcounter.h',
)
+if not with_platform_windows
+ amd_common_files += files(
+ 'ac_rtld.c',
+ 'ac_rtld.h',
+ 'ac_rgp_elf_object_pack.c',
+ )
+endif
+
libamd_common = static_library(
'amd_common',
[amd_common_files, sid_tables_h, amdgfxregs_h, gfx10_format_table_c],
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index a5423108cab..f46b76fe6a0 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -41,7 +41,9 @@
#include "util/debug.h"
#include "ac_binary.h"
#include "ac_nir.h"
+#ifndef _WIN32
#include "ac_rtld.h"
+#endif
#include "aco_interface.h"
#include "sid.h"
#include "vk_format.h"
@@ -1903,6 +1905,7 @@ radv_postprocess_config(const struct radv_device *device, const struct ac_shader
}
}
+#ifndef _WIN32
static bool
radv_open_rtld_binary(struct radv_device *device, const struct radv_shader *shader,
const struct radv_shader_binary *binary, struct ac_rtld_binary *rtld_binary)
@@ -1946,12 +1949,16 @@ radv_open_rtld_binary(struct radv_device *device, const struct radv_shader *shad
return ac_rtld_open(rtld_binary, open_info);
}
+#endif
bool
radv_shader_binary_upload(struct radv_device *device, const struct radv_shader_binary *binary,
struct radv_shader *shader, void *dest_ptr)
{
if (binary->type == RADV_BINARY_TYPE_RTLD) {
+#ifdef _WIN32
+ return false;
+#else
struct ac_rtld_binary rtld_binary = {0};
if (!radv_open_rtld_binary(device, shader, binary, &rtld_binary)) {
@@ -1973,6 +1980,7 @@ radv_shader_binary_upload(struct radv_device *device, const struct radv_shader_b
shader->code_ptr = dest_ptr;
ac_rtld_close(&rtld_binary);
+#endif
} else {
struct radv_shader_binary_legacy *bin = (struct radv_shader_binary_legacy *)binary;
memcpy(dest_ptr, bin->data + bin->stats_size, bin->code_size);
@@ -2001,6 +2009,10 @@ radv_shader_create(struct radv_device *device, struct radv_shader_binary *binary
shader->binary = binary;
if (binary->type == RADV_BINARY_TYPE_RTLD) {
+#ifdef _WIN32
+ free(shader);
+ return NULL;
+#else
struct ac_rtld_binary rtld_binary = {0};
if (!radv_open_rtld_binary(device, shader, binary, &rtld_binary)) {
@@ -2028,6 +2040,7 @@ radv_shader_create(struct radv_device *device, struct radv_shader_binary *binary
shader->code_size = rtld_binary.rx_size;
shader->exec_size = rtld_binary.exec_size;
ac_rtld_close(&rtld_binary);
+#endif
} else {
assert(binary->type == RADV_BINARY_TYPE_LEGACY);
config = ((struct radv_shader_binary_legacy *)binary)->base.config;
@@ -2047,6 +2060,10 @@ radv_shader_create(struct radv_device *device, struct radv_shader_binary *binary
}
if (binary->type == RADV_BINARY_TYPE_RTLD) {
+#ifdef _WIN32
+ free(shader);
+ return NULL;
+#else
struct radv_shader_binary_rtld *bin = (struct radv_shader_binary_rtld *)binary;
struct ac_rtld_binary rtld_binary = {0};
@@ -2072,6 +2089,7 @@ radv_shader_create(struct radv_device *device, struct radv_shader_binary *binary
shader->disasm_string[disasm_size] = 0;
}
ac_rtld_close(&rtld_binary);
+#endif
} else {
struct radv_shader_binary_legacy *bin = (struct radv_shader_binary_legacy *)binary;
diff --git a/subprojects/libelf.wrap b/subprojects/libelf.wrap
deleted file mode 100644
index 5846f2dfc10..00000000000
--- a/subprojects/libelf.wrap
+++ /dev/null
@@ -1,6 +0,0 @@
-[wrap-git]
-directory = libelf-lfg-win32-1.1.0-freebsd-12.1.0
-
-url = https://github.com/LagFreeGames/libelf-lfg-win32.git
-revision = 1.1.0
-depth = 1