mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 10:58:03 +03:00
i hate this thing
This commit is contained in:
3 files changed
+74
-1
No files matched your search
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
llvmPkgs = pkgs.llvmPackages_19;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
name = "mesa-crocus-opencl";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
# build tools
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
pkg-config
|
||||||
|
cmake
|
||||||
|
python3
|
||||||
|
python3Packages.packaging
|
||||||
|
|
||||||
|
# LLVM stack
|
||||||
|
llvmPkgs.llvm.dev
|
||||||
|
llvmPkgs.clang
|
||||||
|
llvmPkgs.libclc
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
rust-bindgen
|
||||||
|
rustc
|
||||||
|
cargo
|
||||||
|
|
||||||
|
# Mesa deps
|
||||||
|
libdrm
|
||||||
|
expat
|
||||||
|
zlib
|
||||||
|
zstd
|
||||||
|
glslang
|
||||||
|
libffi
|
||||||
|
elfutils
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export PKG_CONFIG_PATH=${pkgs.llvmPackages_19.libclc}/share/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -482,6 +482,15 @@ static void
|
|||||||
crocus_query_memory_info(struct pipe_screen *pscreen,
|
crocus_query_memory_info(struct pipe_screen *pscreen,
|
||||||
struct pipe_memory_info *info)
|
struct pipe_memory_info *info)
|
||||||
{
|
{
|
||||||
|
struct crocus_screen *screen = (struct crocus_screen *) pscreen;
|
||||||
|
|
||||||
|
const uint64_t total_kb =
|
||||||
|
(uint64_t)screen->base.caps.video_memory * 1024;
|
||||||
|
|
||||||
|
info->total_device_memory = 0;
|
||||||
|
info->avail_device_memory = 0;
|
||||||
|
info->total_staging_memory = (uint32_t)MIN2(total_kb, UINT32_MAX);
|
||||||
|
info->avail_staging_memory = info->total_staging_memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|||||||
@@ -503,7 +503,13 @@ impl PipeScreen {
|
|||||||
&self,
|
&self,
|
||||||
shader: mesa_shader_stage,
|
shader: mesa_shader_stage,
|
||||||
) -> *const nir_shader_compiler_options {
|
) -> *const nir_shader_compiler_options {
|
||||||
self.screen().nir_options[shader as usize]
|
let ptr = self.screen().nir_options[shader as usize];
|
||||||
|
assert!(
|
||||||
|
!ptr.is_null(),
|
||||||
|
"nir_options[{:?}] is null — driver compute NIR options set edilmemiş",
|
||||||
|
shader
|
||||||
|
);
|
||||||
|
ptr
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shader_cache(&self) -> Option<DiskCacheBorrowed> {
|
pub fn shader_cache(&self) -> Option<DiskCacheBorrowed> {
|
||||||
|
|||||||
Reference in new issue
Block a user