Skip to content

Commit 8dffc3b

Browse files
committed
update sokol
1 parent 3a40151 commit 8dffc3b

11 files changed

Lines changed: 575 additions & 483 deletions

File tree

build/colorquad.glsl.h

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
Bind slot: UB_vs_params => 0
2424
Storage buffer 'sr_lut':
2525
C struct: sr_mat_t
26-
Bind slot: SBUF_sr_lut => 0
26+
Bind slot: VIEW_sr_lut => 0
2727
Readonly: true
2828
*/
2929
#if !defined(SOKOL_GFX_INCLUDED)
@@ -40,7 +40,7 @@
4040
#define ATTR_colorquad_idx (1)
4141
#define ATTR_colorquad_c (2)
4242
#define UB_vs_params (0)
43-
#define SBUF_sr_lut (0)
43+
#define VIEW_sr_lut (0)
4444
#pragma pack(push,1)
4545
SOKOL_SHDC_ALIGN(16) typedef struct vs_params_t {
4646
float framesize[2];
@@ -58,7 +58,7 @@ SOKOL_SHDC_ALIGN(8) typedef struct sr_mat_t {
5858
row_major float2x2 m;
5959
};
6060
61-
ByteAddressBuffer _53 : register(t16);
61+
ByteAddressBuffer _53 : register(t0);
6262
cbuffer vs_params : register(b0)
6363
{
6464
float2 _66_framesize : packoffset(c0);
@@ -109,90 +109,90 @@ SOKOL_SHDC_ALIGN(8) typedef struct sr_mat_t {
109109
return stage_output;
110110
}
111111
*/
112-
static const uint8_t vs_source_hlsl4[1313] = {
112+
static const uint8_t vs_source_hlsl4[1312] = {
113113
0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x73,0x72,0x5f,0x6d,0x61,0x74,0x0a,0x7b,0x0a,
114114
0x20,0x20,0x20,0x20,0x72,0x6f,0x77,0x5f,0x6d,0x61,0x6a,0x6f,0x72,0x20,0x66,0x6c,
115115
0x6f,0x61,0x74,0x32,0x78,0x32,0x20,0x6d,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x42,0x79,
116116
0x74,0x65,0x41,0x64,0x64,0x72,0x65,0x73,0x73,0x42,0x75,0x66,0x66,0x65,0x72,0x20,
117117
0x5f,0x35,0x33,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x28,0x74,
118-
0x31,0x36,0x29,0x3b,0x0a,0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,
119-
0x70,0x61,0x72,0x61,0x6d,0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,
120-
0x72,0x28,0x62,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
121-
0x74,0x32,0x20,0x5f,0x36,0x36,0x5f,0x66,0x72,0x61,0x6d,0x65,0x73,0x69,0x7a,0x65,
122-
0x20,0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,
123-
0x29,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,
124-
0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,
125-
0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x74,0x20,0x67,0x6c,
126-
0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x3b,0x0a,0x73,0x74,
127-
0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,
128-
0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x69,0x6e,
129-
0x74,0x20,0x69,0x64,0x78,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,
130-
0x6f,0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,
131-
0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x3b,0x0a,0x0a,0x73,0x74,
132-
0x72,0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
133-
0x5f,0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,
134-
0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x54,
135-
0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,
136-
0x6e,0x74,0x20,0x69,0x64,0x78,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,
137-
0x44,0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,
138-
0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x20,0x20,
139-
0x20,0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,
140-
0x49,0x6e,0x64,0x65,0x78,0x20,0x3a,0x20,0x53,0x56,0x5f,0x56,0x65,0x72,0x74,0x65,
141-
0x78,0x49,0x44,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,
142-
0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,
143-
0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,
144-
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
145-
0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,
146-
0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,
147-
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,
148-
0x64,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,
149-
0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x32,0x20,0x75,0x32,0x20,0x3d,0x20,0x69,0x6e,
150-
0x74,0x32,0x28,0x30,0x2c,0x20,0x69,0x6e,0x74,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,
151-
0x6f,0x6e,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x32,
152-
0x20,0x76,0x32,0x20,0x3d,0x20,0x69,0x6e,0x74,0x32,0x28,0x30,0x2c,0x20,0x69,0x6e,
153-
0x74,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x77,0x29,0x29,0x3b,0x0a,
154-
0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x78,0x32,0x20,0x5f,0x35,0x39,
155-
0x20,0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x75,0x69,0x6e,0x74,0x32,
156-
0x78,0x32,0x28,0x5f,0x35,0x33,0x2e,0x4c,0x6f,0x61,0x64,0x32,0x28,0x69,0x64,0x78,
157-
0x20,0x2a,0x20,0x31,0x36,0x20,0x2b,0x20,0x30,0x29,0x2c,0x20,0x5f,0x35,0x33,0x2e,
158-
0x4c,0x6f,0x61,0x64,0x32,0x28,0x69,0x64,0x78,0x20,0x2a,0x20,0x31,0x36,0x20,0x2b,
159-
0x20,0x38,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
160-
0x32,0x20,0x5f,0x37,0x30,0x20,0x3d,0x20,0x28,0x6d,0x75,0x6c,0x28,0x5f,0x35,0x39,
161-
0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x75,
162-
0x32,0x5b,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,
163-
0x20,0x26,0x20,0x31,0x5d,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x32,
118+
0x30,0x29,0x3b,0x0a,0x63,0x62,0x75,0x66,0x66,0x65,0x72,0x20,0x76,0x73,0x5f,0x70,
119+
0x61,0x72,0x61,0x6d,0x73,0x20,0x3a,0x20,0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,
120+
0x28,0x62,0x30,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,
121+
0x32,0x20,0x5f,0x36,0x36,0x5f,0x66,0x72,0x61,0x6d,0x65,0x73,0x69,0x7a,0x65,0x20,
122+
0x3a,0x20,0x70,0x61,0x63,0x6b,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0x63,0x30,0x29,
123+
0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,
124+
0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
125+
0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,
126+
0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x3b,0x0a,0x73,0x74,0x61,
127+
0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,
128+
0x69,0x6f,0x6e,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x75,0x69,0x6e,0x74,
129+
0x20,0x69,0x64,0x78,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,0x63,0x20,0x66,0x6c,0x6f,
130+
0x61,0x74,0x34,0x20,0x63,0x6f,0x6c,0x6f,0x72,0x3b,0x0a,0x73,0x74,0x61,0x74,0x69,
131+
0x63,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x3b,0x0a,0x0a,0x73,0x74,0x72,
132+
0x75,0x63,0x74,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,
133+
0x49,0x6e,0x70,0x75,0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,
134+
0x74,0x34,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x54,0x45,
135+
0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x75,0x69,0x6e,
136+
0x74,0x20,0x69,0x64,0x78,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,
137+
0x31,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,0x20,
138+
0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x32,0x3b,0x0a,0x20,0x20,0x20,
139+
0x20,0x75,0x69,0x6e,0x74,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,
140+
0x6e,0x64,0x65,0x78,0x20,0x3a,0x20,0x53,0x56,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,
141+
0x49,0x44,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x73,0x74,0x72,0x75,0x63,0x74,0x20,0x53,
142+
0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,
143+
0x74,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x63,
144+
0x6f,0x6c,0x6f,0x72,0x20,0x3a,0x20,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x30,
145+
0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x20,0x67,0x6c,0x5f,
146+
0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3a,0x20,0x53,0x56,0x5f,0x50,0x6f,
147+
0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x7d,0x3b,0x0a,0x0a,0x76,0x6f,0x69,0x64,
148+
0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,
149+
0x20,0x20,0x20,0x69,0x6e,0x74,0x32,0x20,0x75,0x32,0x20,0x3d,0x20,0x69,0x6e,0x74,
150+
0x32,0x28,0x30,0x2c,0x20,0x69,0x6e,0x74,0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,
151+
0x6e,0x2e,0x7a,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x6e,0x74,0x32,0x20,
152+
0x76,0x32,0x20,0x3d,0x20,0x69,0x6e,0x74,0x32,0x28,0x30,0x2c,0x20,0x69,0x6e,0x74,
153+
0x28,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x2e,0x77,0x29,0x29,0x3b,0x0a,0x20,
154+
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x78,0x32,0x20,0x5f,0x35,0x39,0x20,
155+
0x3d,0x20,0x61,0x73,0x66,0x6c,0x6f,0x61,0x74,0x28,0x75,0x69,0x6e,0x74,0x32,0x78,
156+
0x32,0x28,0x5f,0x35,0x33,0x2e,0x4c,0x6f,0x61,0x64,0x32,0x28,0x69,0x64,0x78,0x20,
157+
0x2a,0x20,0x31,0x36,0x20,0x2b,0x20,0x30,0x29,0x2c,0x20,0x5f,0x35,0x33,0x2e,0x4c,
158+
0x6f,0x61,0x64,0x32,0x28,0x69,0x64,0x78,0x20,0x2a,0x20,0x31,0x36,0x20,0x2b,0x20,
159+
0x38,0x29,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,
160+
0x20,0x5f,0x37,0x30,0x20,0x3d,0x20,0x28,0x6d,0x75,0x6c,0x28,0x5f,0x35,0x39,0x2c,
161+
0x20,0x66,0x6c,0x6f,0x61,0x74,0x32,0x28,0x66,0x6c,0x6f,0x61,0x74,0x28,0x75,0x32,
164162
0x5b,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,
165-
0x3e,0x3e,0x20,0x31,0x5d,0x29,0x29,0x29,0x20,0x2b,0x20,0x70,0x6f,0x73,0x69,0x74,
166-
0x69,0x6f,0x6e,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x5f,0x36,0x36,0x5f,0x66,0x72,
167-
0x61,0x6d,0x65,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,
168-
0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,
169-
0x34,0x28,0x5f,0x37,0x30,0x2e,0x78,0x20,0x2d,0x20,0x31,0x2e,0x30,0x66,0x2c,0x20,
170-
0x5f,0x37,0x30,0x2e,0x79,0x20,0x2b,0x20,0x31,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,
171-
0x30,0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,
172-
0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,
173-
0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,
174-
0x6d,0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,
175-
0x5f,0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,
176-
0x75,0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,
177-
0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x73,
178-
0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x56,0x65,
179-
0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
180-
0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,
181-
0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,
182-
0x0a,0x20,0x20,0x20,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,
183-
0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x69,0x64,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,
184-
0x63,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,
185-
0x63,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,
186-
0x28,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,
187-
0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,
188-
0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,
189-
0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,
190-
0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,
191-
0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,
192-
0x75,0x74,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,
193-
0x6c,0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,
194-
0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,
195-
0x00,
163+
0x26,0x20,0x31,0x5d,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x28,0x76,0x32,0x5b,
164+
0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3e,
165+
0x3e,0x20,0x31,0x5d,0x29,0x29,0x29,0x20,0x2b,0x20,0x70,0x6f,0x73,0x69,0x74,0x69,
166+
0x6f,0x6e,0x2e,0x78,0x79,0x29,0x20,0x2a,0x20,0x5f,0x36,0x36,0x5f,0x66,0x72,0x61,
167+
0x6d,0x65,0x73,0x69,0x7a,0x65,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,
168+
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,
169+
0x28,0x5f,0x37,0x30,0x2e,0x78,0x20,0x2d,0x20,0x31,0x2e,0x30,0x66,0x2c,0x20,0x5f,
170+
0x37,0x30,0x2e,0x79,0x20,0x2b,0x20,0x31,0x2e,0x30,0x66,0x2c,0x20,0x30,0x2e,0x30,
171+
0x66,0x2c,0x20,0x31,0x2e,0x30,0x66,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,0x6f,
172+
0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x3b,0x0a,0x7d,0x0a,0x0a,0x53,0x50,0x49,0x52,
173+
0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x6d,
174+
0x61,0x69,0x6e,0x28,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,0x73,0x73,0x5f,
175+
0x49,0x6e,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,
176+
0x74,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x56,0x65,0x72,0x74,
177+
0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x20,0x3d,0x20,0x69,0x6e,0x74,0x28,0x73,0x74,
178+
0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x56,0x65,0x72,
179+
0x74,0x65,0x78,0x49,0x6e,0x64,0x65,0x78,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x70,
180+
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
181+
0x69,0x6e,0x70,0x75,0x74,0x2e,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
182+
0x20,0x20,0x20,0x20,0x69,0x64,0x78,0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
183+
0x69,0x6e,0x70,0x75,0x74,0x2e,0x69,0x64,0x78,0x3b,0x0a,0x20,0x20,0x20,0x20,0x63,
184+
0x20,0x3d,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x70,0x75,0x74,0x2e,0x63,
185+
0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x72,0x74,0x5f,0x6d,0x61,0x69,0x6e,0x28,
186+
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x53,0x50,0x49,0x52,0x56,0x5f,0x43,0x72,0x6f,
187+
0x73,0x73,0x5f,0x4f,0x75,0x74,0x70,0x75,0x74,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,
188+
0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,
189+
0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x2e,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,
190+
0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,
191+
0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x73,0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,
192+
0x74,0x70,0x75,0x74,0x2e,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x63,0x6f,0x6c,
193+
0x6f,0x72,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x73,
194+
0x74,0x61,0x67,0x65,0x5f,0x6f,0x75,0x74,0x70,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x00,
195+
196196
};
197197
/*
198198
static float4 frag_color;
@@ -277,9 +277,9 @@ static inline const sg_shader_desc* colorquad_shader_desc(sg_backend backend) {
277277
desc.uniform_blocks[0].layout = SG_UNIFORMLAYOUT_STD140;
278278
desc.uniform_blocks[0].size = 16;
279279
desc.uniform_blocks[0].hlsl_register_b_n = 0;
280-
desc.storage_buffers[0].stage = SG_SHADERSTAGE_VERTEX;
281-
desc.storage_buffers[0].readonly = true;
282-
desc.storage_buffers[0].hlsl_register_t_n = 16;
280+
desc.views[0].storage_buffer.stage = SG_SHADERSTAGE_VERTEX;
281+
desc.views[0].storage_buffer.readonly = true;
282+
desc.views[0].storage_buffer.hlsl_register_t_n = 0;
283283
desc.label = "colorquad_shader";
284284
}
285285
return &desc;

0 commit comments

Comments
 (0)