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
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,
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;
fclose(f);
return 0;
+#endif
}
'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',
'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',
'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],
#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"
}
}
+#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)
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)) {
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);
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)) {
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;
}
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};
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;