wgpu_compute_shader/default.nix
Julius Koskela e1e9b8dd18
🚀 Initial wgpu matrix multiplication test, fails to build on Linux
Signed-off-by: Julius Koskela <julius.koskela@unikie.com>
2023-12-21 21:00:20 +02:00

46 lines
1.4 KiB
Nix

{pkgs}:
with pkgs;
rustPlatform.buildRustPackage {
pname = "matmul-vshader";
version = "0.1.0";
src = ./.;
packages = [cmake shaderc];
buildInputs = [cmake shaderc];
nativeBuildInputs = [
vulkan-headers
vulkan-loader
vulkan-validation-layers
vulkan-tools
pkg-config
git
gcc
cmake
glibc
python3
shaderc
];
RUST_BACKTRACE = "1";
# LD_LIBRARY_PATH = "${vulkan-loader}/lib:${vulkan-validation-layers}/lib:${vulkan-tools}/lib:${vulkan-headers}/lib:${pkgs.stdenv.cc.cc.lib}:${pkgs.stdenv.cc.cc.lib64}";
# VK_ICD_FILENAMES = "${vulkan-loader}/share/vulkan/icd.d/radeon_icd64.json";
# VK_LAYER_PATH = "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
# VK_INSTANCE_LAYERS = "VK_LAYER_KHRONOS_validation";
# VK_DEVICE_LAYERS = "VK_LAYER_KHRONOS_validation";
# VK_LOADER_DEBUG = "all";
# VK_LOADER_DEBUG_FILE = "/tmp/vulkan.log";
# VK_INSTANCE_EXTENSIONS = "VK_EXT_debug_utils";
# VK_DEVICE_EXTENSIONS = "VK_EXT_debug_utils";
# VK_LAYER_ENABLES = "VK_LAYER_KHRONOS_validation";
# VK_LAYER_DISABLES = "VK_LAYER_LUNARG_api_dump";
# VK_LAYER_PATH = "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
cargoBuildFlags = ["--release"];
cargoLock = {
lockFile = ./Cargo.lock;
allowBuiltinFetchGit = true;
};
}