Skip to content

Instantly share code, notes, and snippets.

View Themaister's full-sized avatar

Hans-Kristian Arntzen Themaister

View GitHub Profile
AppendStructuredBuffer<float4> append_buffer;
ConsumeStructuredBuffer<float4> consume_buffer;
RWStructuredBuffer<float4> rw_struct_buffer;
RWStructuredBuffer<float4> rw_struct_buffer_no_counter;
StructuredBuffer<float4> struct_buffer;
float4 main(uint pos : FOO) : SV_Target0
{
rw_struct_buffer_no_counter[10] = float4(1.0, 2.0, 3.0, 4.0);
This is probably not the best place to put this, but whatever. I needed to get this down somewhere before I forget.
I've been looking at the latest efforts in software rendered N64 lately and the graphics programmer in me got interested.
Since I'm a (GP)GPU programmer I want to see this accelerated on the GPU somehow but the naive "render triangles method" is inadequate I think and trying to do LLE with a HLE mindset is fundamentally flawed.
Looking at Angrylion's RDP plugin, the N64 clearly has an extremely specific rasterization and interpolation algorithm
which I believe is not possible to recreate exactly with naive "draw triangle" in OpenGL or any other API (I haven't seen any evidence to the contrary).
Apparently all the OpenGL LLE implementations atm are horribly and utterly broken, so clearly it’s quite hard.
We need a custom rasterizer and this is where things will start to get interesting ...
From cc3255fa6810e63b34d8c1fa98bec1b2037625d4 Mon Sep 17 00:00:00 2001
From: Hans-Kristian Arntzen <maister@archlinux.us>
Date: Sat, 30 Jan 2016 00:14:00 +0100
Subject: [PATCH] Should fix few issues with netplay.
One perf fix and 3/4 player fix.
---
netplay/netplay.c | 7 +++++++
netplay/netplay_net.c | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
@Themaister
Themaister / gist:efdae15e71b16b00daf3
Created January 26, 2016 20:32
Blind attempt for analog netplay
From 83746a68b4029d207f4eec7d7c3cf3987fa77a71 Mon Sep 17 00:00:00 2001
From: Hans-Kristian Arntzen <maister@archlinux.us>
Date: Tue, 26 Jan 2016 21:31:58 +0100
Subject: [PATCH] Blind attempt to support RETRO_DEVICE_ANALOG in netplay.
---
netplay/netplay.c | 82 ++++++++++++++++++++++++++++++++++-------------
netplay/netplay_private.h | 9 +++---
2 files changed, 64 insertions(+), 27 deletions(-)
From 429188faf002ec326593bde627e9660943113896 Mon Sep 17 00:00:00 2001
From: Hans-Kristian Arntzen <maister@archlinux.us>
Date: Tue, 26 Jan 2016 20:07:26 +0100
Subject: [PATCH] Strip lines with #pragma parameter.
It's not valid GLSL to have quotes in them, and it's meaningless
to pass in the #pragmas to the driver.
---
gfx/drivers_shader/shader_glsl.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_varying out
#define COMPAT_attribute in
#else
#define COMPAT_varying varying
#define COMPAT_attribute attribute
#endif
commit 63d946c69f3a09fcdaa19ff4d16c73ce1a4245b9
Author: Themaister <maister@archlinux.us>
Date: Sun Mar 10 19:14:28 2013 +0100
Add set_rgui_texture interface to video_poke.
diff --git a/driver.h b/driver.h
index 33d7157..b8bab0f 100644
--- a/driver.h
+++ b/driver.h
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
struct bitstream
{
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/fcntl.h>
#include <sys/un.h>
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/fcntl.h>
#include <sys/un.h>
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <unistd.h>