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
| // SPDX-License-Identifier: CC0-1.0 | |
| #pragma once | |
| #include "Common/CommonTypes.h" | |
| #include "Common/Assert.h" | |
| #include <array> | |
| #include <bit> | |
| #include <cstddef> |
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
| /// Like decode_huffman_lookup, but the first level is unrolled, and much bigger | |
| /// Any code that fits in 5 bits and decodes to 5 bits or less can be done in a single table lookup | |
| pub fn decode_huffman_unrolled(buffer: u64, mut table: &[u8]) -> (u32, usize) { | |
| // Lookup first 5 bits (32 entry table) | |
| let idx = buffer >> 59; // 1 cycle | |
| let lookup = unsafe { *table.get_unchecked(idx as usize) }; // 2 cycles | |
| let mut total_bits = 5; // 1 cycle (load interlock) | |
| let lookup_5 = lookup >> 5; // 1 cycle | |
| let mut neg_bits = lookup_5 as i32 - 3; // 1 cycle |
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
| from construct import * | |
| def sizeof_struct(subcon, value, parent=None): | |
| ctx = Container(value) | |
| ctx._ = parent or Container() | |
| ctx._params = Container() | |
| ctx._parsing = False | |
| ctx._sizing = True | |
| ctx._building = False |
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
| EP1189173A2 - Highly detailed XF pipeline | |
| US6489963 - graphics api | |
| US6580430 - fog | |
| US6618048 near-far clipping | |
| US6636214 - early depth (shows graphics pipeline) | |
| US6664962 - shadow mapping (technique) | |
| US6700586 - XF pipeline | |
| US6717577 - Early vertex cache? might not be gamecube | |
| US7034828 - tev | |
| US7071945 - CP commands and vertex formats |
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
| #!/usr/bin/env python3 | |
| # Story time: | |
| # I tend to use cmake for projects these days, but I'm not excatly happy with it's support | |
| # for cross-compiling. Sure, it's flexible enough that you do almost anything, but anything | |
| # advanced (like compiling host tools or building multiple platforms simultaneously) | |
| # requires janky usage of external projects. | |
| # So I set aside some time to explore other build systems to find one that better supported | |
| # my needs. | |
| # I spent some time exploring meson, it had first-party understanding of compiling host tools |
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
| #include <FEXThunkDefs.h> // provides fexgen_config in this model | |
| #include <X11/Xlib.h> | |
| #include <X11/Xproto.h> | |
| #include <X11/Xresource.h> | |
| #include <X11/Xutil.h> | |
| // For each exported function: | |
| fexgen_config exports[] = { | |
| // Variadic functions: The variadic parameters are automatically packed into an unsigned long array |
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
| #include <type_traits> | |
| #include <utility> | |
| template<class ReturnType, class...Xs> | |
| struct CallableBase { | |
| virtual ReturnType operator()(Xs...) const = 0; | |
| virtual ReturnType operator()(Xs...) = 0; | |
| virtual void copy(void*) const = 0; | |
| }; |
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
| %ifdef CONFIG | |
| { | |
| "Match": "All", | |
| "RegData": { | |
| "MM7": ["0xfb53d1c000000000", "0x4002"] | |
| } | |
| } | |
| %endif |
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
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <signal.h> | |
| #include <stdatomic.h> | |
| #include <stdlib.h> | |
| atomic_int count = 0; | |
| void sig_handler(int signum) { | |
| printf("Alarm %i\n", count++); |
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
| 0001/0:0001: #version 120 | |
| 0002/0:0002: #define GL2 | |
| 0003/0:0003: #define texture texture2D | |
| 0004/0:0004: #define VSIN(index) attribute | |
| 0005/0:0005: #define VSOUT varying | |
| 0006/0:0006: #define FSIN varying | |
| 0007/0:0007: #define FRAGCOLOR(c) (gl_FragColor = c) | |
| 0008/1:0001: #define DIRECTIONALS | |
| 0009/1:0002: //#define POINTLIGHTS |
NewerOlder