mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 03:59:59 -04:00
Describe what the code does in comments and docs.
Comments say what the code does and why, docs/maxwell.md keeps the Maxwell facts, and fetch_refs.sh clones only the checkout the build reads. Code is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "nvn_tex.h"
|
||||
#include "vk.h"
|
||||
|
||||
// ---- tex_deswizzle.c (MacNativeGames nvn_deswizzle.c, MIT) ----
|
||||
// ---- tex_deswizzle.c ----
|
||||
// Block-linear <-> linear for one level and layer of a texture. The linear side is laid out by block rows: dst_pitch
|
||||
// bytes per row (>= row bytes of the level), compressed formats one block row per row, 3D textures slice k at
|
||||
// dst + k * dst_pitch * block rows. LINEAR / LINEAR_RENDER_TARGET storage is copied by pitch. Multisampled and BUFFER
|
||||
@@ -31,7 +31,7 @@ int nvn_deswizzle_geom(const nvn_texdesc *d, unsigned level, unsigned layer, uin
|
||||
void tex_bl_copy(uint8_t *bl, uint8_t *lin, size_t pitch, uint32_t row_bytes, uint32_t rows, uint32_t slices,
|
||||
unsigned th, unsigned td, int to_linear);
|
||||
|
||||
// ---- tex_astc.c (LAS Recomp runtime/nvn/astc.c, MIT) ----
|
||||
// ---- tex_astc.c ----
|
||||
// ASTC LDR 2D to RGBA8, bit-exact with astcenc's 8-bit decode. blocks: row-major 16-byte blocks covering
|
||||
// ceil(width/bw) x ceil(height/bh); rgba_out: width*height*4 bytes. srgb only selects the sRGB endpoint expansion.
|
||||
// Error blocks and HDR content decode to magenta.
|
||||
@@ -42,7 +42,7 @@ bool astc_decode_block(const uint8_t block[16], uint32_t bw, uint32_t bh, bool s
|
||||
void astc_decode_ldr_mt(const uint8_t *blocks, uint32_t width, uint32_t height, uint32_t bw, uint32_t bh, bool srgb,
|
||||
uint8_t *rgba_out);
|
||||
|
||||
// ---- vk_formats.c (LAS Recomp runtime/nvn/vulkan/textures.c format table, MIT) ----
|
||||
// ---- vk_formats.c ----
|
||||
typedef struct TexVkFormat {
|
||||
VkFormat vk; // format of the image created on this GPU
|
||||
VkFormat ideal; // format the NVN format maps to by itself; differs from vk after a fallback
|
||||
|
||||
Reference in New Issue
Block a user