Mark struct members as uniform
Some checks failed
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Has been cancelled
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Has been cancelled
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Has been cancelled
CI / Linux package (push) Has been cancelled
CI / Bundle test (macos-latest) (push) Has been cancelled
CI / Bundle test (ubuntu-latest) (push) Has been cancelled
CI / macOS Brew (push) Has been cancelled
CI / Test ./dev.sh and benchmark (push) Has been cancelled

This commit is contained in:
Kovid Goyal 2026-07-30 09:30:56 +05:30
parent 30eedbdd02
commit fcd56ce18a
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 7 deletions

View file

@ -39,11 +39,7 @@ uniform Sampler2D backbuffer;
uniform uint timestamp;
public float4 pipeline_fragment_main(float2 texcoord) {
KittyCustomShaderData d;
d.backbuffer = backbuffer;
d.texcoord = texcoord;
d.backbuffer = backbuffer;
d.timestamp = timestamp;
KittyCustomShaderData d = {timestamp, backbuffer, texcoord};
float4 color = backbuffer.Sample(texcoord);
// PIPELINE
return color;

View file

@ -5,7 +5,8 @@
public struct KittyCustomShaderData {
public uint timestamp;
public uniform uint timestamp;
public uniform Sampler2D backbuffer;
public float2 texcoord;
public Sampler2D backbuffer;
}