https://forum.level1techs.com/t/vega-10-and-12-reset-application/145666
This file contains 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
/** | |
* Matches against GLSL shader outputs. | |
*/ | |
const VARYING_REGEX = /[^\w](?:varying|out)\s+\w+\s+(\w+)\s*;/g | |
/** | |
* Adds line numbers to a string with an optional starting offset. | |
*/ | |
const lineNumbers = (source: string, offset = 0): string => source.replace(/^/gm, () => `${offset++}:`) |
This file contains 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
// Summary of Flecs data structures | |
// This is a non-exhaustive overview of flecs datastructures. Things have been ommitted/have different names for clarity. | |
// --- DATASTRUCTURES | |
// A sparse set is a map-like structure that guarantees O(1) lookup times (as opposed to O(1) on average for maps) at the cost of | |
// requiring more RAM (more info on the general idea of sparse sets: https://www.geeksforgeeks.org/sparse-set/) | |
struct ecs_sparse_t { }; |
This file contains 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
static int reset_amdgpu_vega(struct pci_dev *dev, int probe) { | |
#define AMDGPU_MAX_USEC_TIMEOUT 100000 | |
#define MP0_BASE 0x16000 | |
#define mmMP0_SMN_C2PMSG_33 ((MP0_BASE + 0x0061) * 4) | |
#define mmMP0_SMN_C2PMSG_64 ((MP0_BASE + 0x0080) * 4) | |
#define mmMP0_SMN_C2PMSG_81 ((MP0_BASE + 0x0091) * 4) | |
resource_size_t rmmio_base, rmmio_size; | |
void __iomem *rmmio; | |
int ret; |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |
This file contains 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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |