This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsafe trait VulkanInstanceInitializationCallbacks { | |
/// Given the list of available instance extensions, you can extend the list of extensions | |
/// that are requested. | |
/// | |
/// # SAFETY | |
/// | |
/// - All extensions in `requested_extensions` must be in `available_extensions`. | |
fn extend_instance_extensions<'a>( | |
&'a mut self, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn low(a: u32) -> u32 { | |
a & 0xFFFF | |
} | |
fn high(a: u32) -> u32 { | |
a >> 16 | |
} | |
fn splice(w1: u32, w0: u32) -> u32 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Requirement "maxPerStageDescriptorSamplers >= 1024" loses 51 (and partially loses 5) further deviceNames: | |
In ALL reports (51 deviceNames): | |
x AMD Radeon Pro 560: 1 (34781) | |
x AMD Radeon Pro 560X: 1 (33962) | |
x AMD Radeon R9 M290X: 1 (33801) | |
x Apple A15 GPU: 3 (33774 34008 34289) | |
x Apple A16 GPU: 3 (33762 33830 34432) | |
x Apple A17 Pro GPU: 1 (34786) | |
x Apple A18 Pro GPU: 1 (34726) | |
x Apple M1: 7 (33858 34007 34214 34496 34528 34753 34852) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{collections::VecDeque, ffi::c_void, mem}; | |
use anyhow::Context; | |
use arrayvec::ArrayVec; | |
use glam::UVec2; | |
use windows::{ | |
core::Interface, | |
Win32::{ | |
Foundation::*, | |
Graphics::{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use glam::UVec2; | |
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; | |
use sdl2::{ | |
event::{Event, WindowEvent}, | |
keyboard::Keycode, | |
}; | |
use windows::Win32::Foundation::HWND; | |
#[no_mangle] | |
pub static D3D12SDKVersion: u32 = 614; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import os | |
import subprocess | |
from pathlib import Path | |
parser = argparse.ArgumentParser( | |
description="Process gltf into rust-compatible format") | |
parser.add_argument('file', type=Path) | |
parser.add_argument('--force', type=bool) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let iad = pollster::block_on(rend3::create_iad( | |
None, | |
None, | |
Some(RendererMode::CPUPowered), | |
)) | |
.unwrap(); | |
let vert = iad.device.create_shader_module(&ShaderModuleDescriptor { | |
label: Some("vert"), | |
source: ShaderSource::Wgsl( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import os | |
import subprocess | |
from pathlib import Path | |
parser = argparse.ArgumentParser( | |
description="Process gltf into rust-compatible format") | |
parser.add_argument('file', type=Path) | |
parser.add_argument('--force', type=bool) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Things that trigger shader recompiles on NVIDIA GL | |
* Respecifying input assembly via `glVertexAttrib*` for any vertex array | |
* Clearing an individual color attachment with `glClearBuffer*` | |
* Clearing an FBO with `glClear` without specifying all attachments in | |
the clear, e.g if the FBO has color + depth but you only pass `GL_COLOR_BUFFER_BIT` | |
* Attaching shaders to a program | |
* Changing sampler uniforms (all textures are bindless on NV, changing sampler index is bad) | |
* Respecifying `glClearColor` more than once per frame per FBO | |
* Changing depth function more than once per bound program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nalgebra as na; | |
macro_rules! conversions { | |
($trait1:ident, $conv1:ident, $trait2:ident, $conv2:ident, $(($src:ty, $mint:ty, $dst:ty)),* $(,)?) => { | |
$( | |
impl $trait1 for $src { | |
type Target = $dst; | |
fn $conv1(self) -> Self::Target { | |
let m: $mint = self.into(); | |
m.into() |
NewerOlder