Skip to content

Instantly share code, notes, and snippets.

View Themaister's full-sized avatar

Hans-Kristian Arntzen Themaister

View GitHub Profile
./cli/fossilize-disasm /tmp/emergency.json --device-index 1 --graphics-pipeline 0 --target amd --stage frag 20:50
WARNING: radv is not a conformant vulkan implementation, testing use only.
Fossilize INFO: Chose GPU:
Fossilize INFO: name: AMD RADV POLARIS10 (LLVM 6.0.0)
Fossilize INFO: apiVersion: 1.0.57
Fossilize INFO: vendorID: 0x1002
Fossilize INFO: deviceID: 0x67df
Fossilize INFO: Creating shader module #0
Fossilize INFO: ... Succeeded!
Fossilize INFO: Creating shader module #1
cbuffer Foo : register(b0)
{
float4x4 MVP;
};
float4 main(float4 pos : POSITION) : SV_Position
{
return mul(MVP, pos);
}
git clone git://github.com/ARM-software/vulkan-sdk
cd vulkan-sdk
cmake . -DPLATFORM=xcb
make -j16
./samples/multipass/multipass
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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(+)
#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>