Bug Summary

File:var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/debug/build/swgl-436ca0bc8b549ace/out/cs_blur_COLOR_TARGET.h
Warning:line 377, column 14
Value stored to 'texel1' during its initialization is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gl.cc -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -relaxed-aliasing -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -fdenormal-fp-math=preserve-sign,preserve-sign -ffp-contract=fast -fno-rounding-math -mrecip=none -complex-range=limited -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/var/lib/jenkins/workspace/firefox-scan-build/gfx/wr/swgl -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/var/lib/jenkins/workspace/firefox-scan-build/gfx/wr/swgl -resource-dir /usr/lib/llvm-18/lib/clang/18 -include /var/lib/jenkins/workspace/firefox-scan-build/config/gcc_hidden.h -include /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/mozilla-config.h -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/system_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D DEBUG=1 -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/nspr -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/nss -D MOZILLA_CLIENT -D MOZILLA_CONFIG_H -I /var/lib/jenkins/workspace/firefox-scan-build/gfx/wr/swgl/../webrender/res -I src -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/debug/build/swgl-436ca0bc8b549ace/out -U MOZILLA_CONFIG_H -D _GLIBCXX_USE_CXX11_ABI=0 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/backward -internal-isystem /usr/lib/llvm-18/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -std=c++17 -fdeprecated-macro -ferror-limit 19 -stack-protector 2 -fstack-clash-protection -ftrivial-auto-var-init=pattern -fno-rtti -fgnuc-version=4.2.1 -fno-aligned-allocation -vectorize-loops -vectorize-slp -analyzer-checker optin.performance.Padding -analyzer-output=html -analyzer-config stable-report-filename=true -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/scan-build-2024-05-16-034744-15991-1 -x c++ src/gl.cc
1struct cs_blur_COLOR_TARGET_common {
2struct Samplers {
3 sampler2D_impl sClipMask_impl;
4 int sClipMask_slot;
5 sampler2D_impl sColor0_impl;
6 int sColor0_slot;
7 sampler2D_impl sGpuCache_impl;
8 int sGpuCache_slot;
9 sampler2D_impl sPrimitiveHeadersF_impl;
10 int sPrimitiveHeadersF_slot;
11 isampler2D_impl sPrimitiveHeadersI_impl;
12 int sPrimitiveHeadersI_slot;
13 sampler2D_impl sRenderTasks_impl;
14 int sRenderTasks_slot;
15 sampler2D_impl sTransformPalette_impl;
16 int sTransformPalette_slot;
17 bool set_slot(int index, int value) {
18 switch (index) {
19 case 7:
20 sClipMask_slot = value;
21 return true;
22 case 8:
23 sColor0_slot = value;
24 return true;
25 case 2:
26 sGpuCache_slot = value;
27 return true;
28 case 4:
29 sPrimitiveHeadersF_slot = value;
30 return true;
31 case 5:
32 sPrimitiveHeadersI_slot = value;
33 return true;
34 case 1:
35 sRenderTasks_slot = value;
36 return true;
37 case 3:
38 sTransformPalette_slot = value;
39 return true;
40 }
41 return false;
42 }
43} samplers;
44struct AttribLocations {
45 int aPosition = NULL_ATTRIB16;
46 int aData = NULL_ATTRIB16;
47 int aBlurRenderTaskAddress = NULL_ATTRIB16;
48 int aBlurSourceTaskAddress = NULL_ATTRIB16;
49 int aBlurDirection = NULL_ATTRIB16;
50 void bind_loc(const char* name, int index) {
51 if (strcmp("aPosition", name) == 0) { aPosition = index; return; }
52 if (strcmp("aData", name) == 0) { aData = index; return; }
53 if (strcmp("aBlurRenderTaskAddress", name) == 0) { aBlurRenderTaskAddress = index; return; }
54 if (strcmp("aBlurSourceTaskAddress", name) == 0) { aBlurSourceTaskAddress = index; return; }
55 if (strcmp("aBlurDirection", name) == 0) { aBlurDirection = index; return; }
56 }
57 int get_loc(const char* name) const {
58 if (strcmp("aPosition", name) == 0) { return aPosition != NULL_ATTRIB16 ? aPosition : -1; }
59 if (strcmp("aData", name) == 0) { return aData != NULL_ATTRIB16 ? aData : -1; }
60 if (strcmp("aBlurRenderTaskAddress", name) == 0) { return aBlurRenderTaskAddress != NULL_ATTRIB16 ? aBlurRenderTaskAddress : -1; }
61 if (strcmp("aBlurSourceTaskAddress", name) == 0) { return aBlurSourceTaskAddress != NULL_ATTRIB16 ? aBlurSourceTaskAddress : -1; }
62 if (strcmp("aBlurDirection", name) == 0) { return aBlurDirection != NULL_ATTRIB16 ? aBlurDirection : -1; }
63 return -1;
64 }
65} attrib_locations;
66vec4_scalar vTransformBounds;
67vec4_scalar vUvRect;
68vec2_scalar vOffsetScale;
69ivec2_scalar vSupport;
70vec2_scalar vGaussCoefficients;
71sampler2D sClipMask;
72sampler2D sColor0;
73sampler2D sGpuCache;
74sampler2D sPrimitiveHeadersF;
75isampler2D sPrimitiveHeadersI;
76sampler2D sRenderTasks;
77sampler2D sTransformPalette;
78mat4_scalar uTransform;
79void bind_textures() {
80 sClipMask = lookup_sampler(&samplers.sClipMask_impl, samplers.sClipMask_slot);
81 sColor0 = lookup_sampler(&samplers.sColor0_impl, samplers.sColor0_slot);
82 sGpuCache = lookup_sampler(&samplers.sGpuCache_impl, samplers.sGpuCache_slot);
83 sPrimitiveHeadersF = lookup_sampler(&samplers.sPrimitiveHeadersF_impl, samplers.sPrimitiveHeadersF_slot);
84 sPrimitiveHeadersI = lookup_isampler(&samplers.sPrimitiveHeadersI_impl, samplers.sPrimitiveHeadersI_slot);
85 sRenderTasks = lookup_sampler(&samplers.sRenderTasks_impl, samplers.sRenderTasks_slot);
86 sTransformPalette = lookup_sampler(&samplers.sTransformPalette_impl, samplers.sTransformPalette_slot);
87}
88};
89struct cs_blur_COLOR_TARGET_vert : VertexShaderImpl, cs_blur_COLOR_TARGET_common {
90private:
91typedef cs_blur_COLOR_TARGET_vert Self;
92// mat4_scalar uTransform;
93vec2 aPosition;
94// sampler2D sColor0;
95// sampler2D sColor1;
96// sampler2D sColor2;
97struct RectWithSize_scalar {
98vec2_scalar p0;
99vec2_scalar size;
100RectWithSize_scalar() = default;
101RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
102};
103struct RectWithSize {
104vec2 p0;
105vec2 size;
106RectWithSize() = default;
107RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
108RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
109}
110IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
111}
112friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { return RectWithSize(
113if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
114}};
115struct RectWithEndpoint_scalar {
116vec2_scalar p0;
117vec2_scalar p1;
118RectWithEndpoint_scalar() = default;
119RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
120};
121struct RectWithEndpoint {
122vec2 p0;
123vec2 p1;
124RectWithEndpoint() = default;
125RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
126RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
127}
128IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
129}
130friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEndpoint e) { return RectWithEndpoint(
131if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
132}};
133// sampler2D sRenderTasks;
134struct RenderTaskData_scalar {
135RectWithEndpoint_scalar task_rect;
136vec4_scalar user_data;
137RenderTaskData_scalar() = default;
138RenderTaskData_scalar(RectWithEndpoint_scalar task_rect, vec4_scalar user_data) : task_rect(task_rect), user_data(user_data){}
139};
140struct RenderTaskData {
141RectWithEndpoint task_rect;
142vec4 user_data;
143RenderTaskData() = default;
144RenderTaskData(RectWithEndpoint task_rect, vec4 user_data) : task_rect(task_rect), user_data(user_data){}
145RenderTaskData(RectWithEndpoint_scalar task_rect, vec4_scalar user_data):task_rect(task_rect),user_data(user_data){
146}
147IMPLICIT RenderTaskData(RenderTaskData_scalar s):task_rect(s.task_rect),user_data(s.user_data){
148}
149friend RenderTaskData if_then_else(I32 c, RenderTaskData t, RenderTaskData e) { return RenderTaskData(
150if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.user_data, e.user_data));
151}};
152struct PictureTask_scalar {
153RectWithEndpoint_scalar task_rect;
154float device_pixel_scale;
155vec2_scalar content_origin;
156PictureTask_scalar() = default;
157PictureTask_scalar(RectWithEndpoint_scalar task_rect, float device_pixel_scale, vec2_scalar content_origin) : task_rect(task_rect), device_pixel_scale(device_pixel_scale), content_origin(content_origin){}
158};
159struct PictureTask {
160RectWithEndpoint task_rect;
161Float device_pixel_scale;
162vec2 content_origin;
163PictureTask() = default;
164PictureTask(RectWithEndpoint task_rect, Float device_pixel_scale, vec2 content_origin) : task_rect(task_rect), device_pixel_scale(device_pixel_scale), content_origin(content_origin){}
165PictureTask(RectWithEndpoint_scalar task_rect, float device_pixel_scale, vec2_scalar content_origin):task_rect(task_rect),device_pixel_scale(device_pixel_scale),content_origin(content_origin){
166}
167IMPLICIT PictureTask(PictureTask_scalar s):task_rect(s.task_rect),device_pixel_scale(s.device_pixel_scale),content_origin(s.content_origin){
168}
169friend PictureTask if_then_else(I32 c, PictureTask t, PictureTask e) { return PictureTask(
170if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.device_pixel_scale, e.device_pixel_scale), if_then_else(c, t.content_origin, e.content_origin));
171}};
172struct ClipArea_scalar {
173RectWithEndpoint_scalar task_rect;
174float device_pixel_scale;
175vec2_scalar screen_origin;
176ClipArea_scalar() = default;
177ClipArea_scalar(RectWithEndpoint_scalar task_rect, float device_pixel_scale, vec2_scalar screen_origin) : task_rect(task_rect), device_pixel_scale(device_pixel_scale), screen_origin(screen_origin){}
178};
179struct ClipArea {
180RectWithEndpoint task_rect;
181Float device_pixel_scale;
182vec2 screen_origin;
183ClipArea() = default;
184ClipArea(RectWithEndpoint task_rect, Float device_pixel_scale, vec2 screen_origin) : task_rect(task_rect), device_pixel_scale(device_pixel_scale), screen_origin(screen_origin){}
185ClipArea(RectWithEndpoint_scalar task_rect, float device_pixel_scale, vec2_scalar screen_origin):task_rect(task_rect),device_pixel_scale(device_pixel_scale),screen_origin(screen_origin){
186}
187IMPLICIT ClipArea(ClipArea_scalar s):task_rect(s.task_rect),device_pixel_scale(s.device_pixel_scale),screen_origin(s.screen_origin){
188}
189friend ClipArea if_then_else(I32 c, ClipArea t, ClipArea e) { return ClipArea(
190if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.device_pixel_scale, e.device_pixel_scale), if_then_else(c, t.screen_origin, e.screen_origin));
191}};
192// sampler2D sGpuCache;
193struct ImageSource_scalar {
194RectWithEndpoint_scalar uv_rect;
195vec4_scalar user_data;
196ImageSource_scalar() = default;
197ImageSource_scalar(RectWithEndpoint_scalar uv_rect, vec4_scalar user_data) : uv_rect(uv_rect), user_data(user_data){}
198};
199struct ImageSource {
200RectWithEndpoint uv_rect;
201vec4 user_data;
202ImageSource() = default;
203ImageSource(RectWithEndpoint uv_rect, vec4 user_data) : uv_rect(uv_rect), user_data(user_data){}
204ImageSource(RectWithEndpoint_scalar uv_rect, vec4_scalar user_data):uv_rect(uv_rect),user_data(user_data){
205}
206IMPLICIT ImageSource(ImageSource_scalar s):uv_rect(s.uv_rect),user_data(s.user_data){
207}
208friend ImageSource if_then_else(I32 c, ImageSource t, ImageSource e) { return ImageSource(
209if_then_else(c, t.uv_rect, e.uv_rect), if_then_else(c, t.user_data, e.user_data));
210}};
211struct ImageSourceExtra_scalar {
212vec4_scalar st_tl;
213vec4_scalar st_tr;
214vec4_scalar st_bl;
215vec4_scalar st_br;
216ImageSourceExtra_scalar() = default;
217ImageSourceExtra_scalar(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl, vec4_scalar st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
218};
219struct ImageSourceExtra {
220vec4 st_tl;
221vec4 st_tr;
222vec4 st_bl;
223vec4 st_br;
224ImageSourceExtra() = default;
225ImageSourceExtra(vec4 st_tl, vec4 st_tr, vec4 st_bl, vec4 st_br) : st_tl(st_tl), st_tr(st_tr), st_bl(st_bl), st_br(st_br){}
226ImageSourceExtra(vec4_scalar st_tl, vec4_scalar st_tr, vec4_scalar st_bl, vec4_scalar st_br):st_tl(st_tl),st_tr(st_tr),st_bl(st_bl),st_br(st_br){
227}
228IMPLICIT ImageSourceExtra(ImageSourceExtra_scalar s):st_tl(s.st_tl),st_tr(s.st_tr),st_bl(s.st_bl),st_br(s.st_br){
229}
230friend ImageSourceExtra if_then_else(I32 c, ImageSourceExtra t, ImageSourceExtra e) { return ImageSourceExtra(
231if_then_else(c, t.st_tl, e.st_tl), if_then_else(c, t.st_tr, e.st_tr), if_then_else(c, t.st_bl, e.st_bl), if_then_else(c, t.st_br, e.st_br));
232}};
233// vec4_scalar vTransformBounds;
234// sampler2D sTransformPalette;
235struct Transform_scalar {
236mat4_scalar m;
237mat4_scalar inv_m;
238bool is_axis_aligned;
239Transform_scalar() = default;
240Transform_scalar(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned) : m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
241};
242struct Transform {
243mat4 m;
244mat4 inv_m;
245Bool is_axis_aligned;
246Transform() = default;
247Transform(mat4 m, mat4 inv_m, Bool is_axis_aligned) : m(m), inv_m(inv_m), is_axis_aligned(is_axis_aligned){}
248Transform(mat4_scalar m, mat4_scalar inv_m, bool is_axis_aligned):m(m),inv_m(inv_m),is_axis_aligned(is_axis_aligned){
249}
250IMPLICIT Transform(Transform_scalar s):m(s.m),inv_m(s.inv_m),is_axis_aligned(s.is_axis_aligned){
251}
252friend Transform if_then_else(I32 c, Transform t, Transform e) { return Transform(
253if_then_else(c, t.m, e.m), if_then_else(c, t.inv_m, e.inv_m), if_then_else(c, t.is_axis_aligned, e.is_axis_aligned));
254}};
255// sampler2D sClipMask;
256// sampler2D sPrimitiveHeadersF;
257// isampler2D sPrimitiveHeadersI;
258ivec4_scalar aData;
259struct Instance_scalar {
260int32_t prim_header_address;
261int32_t clip_address;
262int32_t segment_index;
263int32_t flags;
264int32_t resource_address;
265int32_t brush_kind;
266Instance_scalar() = default;
267Instance_scalar(int32_t prim_header_address, int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resource_address, int32_t brush_kind) : prim_header_address(prim_header_address), clip_address(clip_address), segment_index(segment_index), flags(flags), resource_address(resource_address), brush_kind(brush_kind){}
268};
269struct Instance {
270I32 prim_header_address;
271I32 clip_address;
272I32 segment_index;
273I32 flags;
274I32 resource_address;
275I32 brush_kind;
276Instance() = default;
277Instance(I32 prim_header_address, I32 clip_address, I32 segment_index, I32 flags, I32 resource_address, I32 brush_kind) : prim_header_address(prim_header_address), clip_address(clip_address), segment_index(segment_index), flags(flags), resource_address(resource_address), brush_kind(brush_kind){}
278Instance(int32_t prim_header_address, int32_t clip_address, int32_t segment_index, int32_t flags, int32_t resource_address, int32_t brush_kind):prim_header_address(prim_header_address),clip_address(clip_address),segment_index(segment_index),flags(flags),resource_address(resource_address),brush_kind(brush_kind){
279}
280IMPLICIT Instance(Instance_scalar s):prim_header_address(s.prim_header_address),clip_address(s.clip_address),segment_index(s.segment_index),flags(s.flags),resource_address(s.resource_address),brush_kind(s.brush_kind){
281}
282friend Instance if_then_else(I32 c, Instance t, Instance e) { return Instance(
283if_then_else(c, t.prim_header_address, e.prim_header_address), if_then_else(c, t.clip_address, e.clip_address), if_then_else(c, t.segment_index, e.segment_index), if_then_else(c, t.flags, e.flags), if_then_else(c, t.resource_address, e.resource_address), if_then_else(c, t.brush_kind, e.brush_kind));
284}};
285struct PrimitiveHeader_scalar {
286RectWithEndpoint_scalar local_rect;
287RectWithEndpoint_scalar local_clip_rect;
288float z;
289int32_t specific_prim_address;
290int32_t transform_id;
291int32_t picture_task_address;
292ivec4_scalar user_data;
293PrimitiveHeader_scalar() = default;
294PrimitiveHeader_scalar(RectWithEndpoint_scalar local_rect, RectWithEndpoint_scalar local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_id, int32_t picture_task_address, ivec4_scalar user_data) : local_rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_address(specific_prim_address), transform_id(transform_id), picture_task_address(picture_task_address), user_data(user_data){}
295};
296struct PrimitiveHeader {
297RectWithEndpoint local_rect;
298RectWithEndpoint local_clip_rect;
299Float z;
300I32 specific_prim_address;
301I32 transform_id;
302I32 picture_task_address;
303ivec4 user_data;
304PrimitiveHeader() = default;
305PrimitiveHeader(RectWithEndpoint local_rect, RectWithEndpoint local_clip_rect, Float z, I32 specific_prim_address, I32 transform_id, I32 picture_task_address, ivec4 user_data) : local_rect(local_rect), local_clip_rect(local_clip_rect), z(z), specific_prim_address(specific_prim_address), transform_id(transform_id), picture_task_address(picture_task_address), user_data(user_data){}
306PrimitiveHeader(RectWithEndpoint_scalar local_rect, RectWithEndpoint_scalar local_clip_rect, float z, int32_t specific_prim_address, int32_t transform_id, int32_t picture_task_address, ivec4_scalar user_data):local_rect(local_rect),local_clip_rect(local_clip_rect),z(z),specific_prim_address(specific_prim_address),transform_id(transform_id),picture_task_address(picture_task_address),user_data(user_data){
307}
308IMPLICIT PrimitiveHeader(PrimitiveHeader_scalar s):local_rect(s.local_rect),local_clip_rect(s.local_clip_rect),z(s.z),specific_prim_address(s.specific_prim_address),transform_id(s.transform_id),picture_task_address(s.picture_task_address),user_data(s.user_data){
309}
310friend PrimitiveHeader if_then_else(I32 c, PrimitiveHeader t, PrimitiveHeader e) { return PrimitiveHeader(
311if_then_else(c, t.local_rect, e.local_rect), if_then_else(c, t.local_clip_rect, e.local_clip_rect), if_then_else(c, t.z, e.z), if_then_else(c, t.specific_prim_address, e.specific_prim_address), if_then_else(c, t.transform_id, e.transform_id), if_then_else(c, t.picture_task_address, e.picture_task_address), if_then_else(c, t.user_data, e.user_data));
312}};
313struct VertexInfo_scalar {
314vec2_scalar local_pos;
315vec4_scalar world_pos;
316VertexInfo_scalar() = default;
317VertexInfo_scalar(vec2_scalar local_pos, vec4_scalar world_pos) : local_pos(local_pos), world_pos(world_pos){}
318};
319struct VertexInfo {
320vec2 local_pos;
321vec4 world_pos;
322VertexInfo() = default;
323VertexInfo(vec2 local_pos, vec4 world_pos) : local_pos(local_pos), world_pos(world_pos){}
324VertexInfo(vec2_scalar local_pos, vec4_scalar world_pos):local_pos(local_pos),world_pos(world_pos){
325}
326IMPLICIT VertexInfo(VertexInfo_scalar s):local_pos(s.local_pos),world_pos(s.world_pos){
327}
328friend VertexInfo if_then_else(I32 c, VertexInfo t, VertexInfo e) { return VertexInfo(
329if_then_else(c, t.local_pos, e.local_pos), if_then_else(c, t.world_pos, e.world_pos));
330}};
331vec2 vUv;
332// vec4_scalar vUvRect;
333// vec2_scalar vOffsetScale;
334// ivec2_scalar vSupport;
335// vec2_scalar vGaussCoefficients;
336int32_t aBlurRenderTaskAddress;
337int32_t aBlurSourceTaskAddress;
338int32_t aBlurDirection;
339struct BlurTask_scalar {
340RectWithEndpoint_scalar task_rect;
341float blur_radius;
342vec2_scalar blur_region;
343BlurTask_scalar() = default;
344BlurTask_scalar(RectWithEndpoint_scalar task_rect, float blur_radius, vec2_scalar blur_region) : task_rect(task_rect), blur_radius(blur_radius), blur_region(blur_region){}
345};
346struct BlurTask {
347RectWithEndpoint task_rect;
348Float blur_radius;
349vec2 blur_region;
350BlurTask() = default;
351BlurTask(RectWithEndpoint task_rect, Float blur_radius, vec2 blur_region) : task_rect(task_rect), blur_radius(blur_radius), blur_region(blur_region){}
352BlurTask(RectWithEndpoint_scalar task_rect, float blur_radius, vec2_scalar blur_region):task_rect(task_rect),blur_radius(blur_radius),blur_region(blur_region){
353}
354IMPLICIT BlurTask(BlurTask_scalar s):task_rect(s.task_rect),blur_radius(s.blur_radius),blur_region(s.blur_region){
355}
356friend BlurTask if_then_else(I32 c, BlurTask t, BlurTask e) { return BlurTask(
357if_then_else(c, t.task_rect, e.task_rect), if_then_else(c, t.blur_radius, e.blur_radius), if_then_else(c, t.blur_region, e.blur_region));
358}};
359RenderTaskData_scalar fetch_render_task_data(int32_t index) {
360 ivec2_scalar uv = make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
361 auto sRenderTasks_uv_fetch = texelFetchPtr(sRenderTasks, uv, 0, 1, 0, 0);
362 vec4_scalar texel0 = texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_fetch, 0, 0);
363 vec4_scalar texel1 = texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_fetch, 1, 0);
364 RectWithEndpoint_scalar task_rect = RectWithEndpoint_scalar((texel0).sel(X,Y), (texel0).sel(Z,W));
365 RenderTaskData_scalar data = RenderTaskData_scalar(task_rect, texel1);
366 return data;
367}
368BlurTask_scalar fetch_blur_task(int32_t address) {
369 RenderTaskData_scalar task_data = fetch_render_task_data(address);
370 BlurTask_scalar task = BlurTask_scalar((task_data).task_rect, ((task_data).user_data).x, ((task_data).user_data).sel(Y,Z));
371 return task;
372}
373RectWithEndpoint_scalar fetch_render_task_rect(int32_t index) {
374 ivec2_scalar uv = make_ivec2(make_int((2u)*((make_uint(index))%((1024u)/(2u)))), make_int((make_uint(index))/((1024u)/(2u))));
375 auto sRenderTasks_uv_fetch = texelFetchPtr(sRenderTasks, uv, 0, 1, 0, 0);
376 vec4_scalar texel0 = texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_fetch, 0, 0);
377 vec4_scalar texel1 = texelFetchUnchecked(sRenderTasks, sRenderTasks_uv_fetch, 1, 0);
Value stored to 'texel1' during its initialization is never read
378 RectWithEndpoint_scalar task_rect = RectWithEndpoint_scalar((texel0).sel(X,Y), (texel0).sel(Z,W));
379 return task_rect;
380}
381void calculate_gauss_coefficients(float sigma) {
382 vGaussCoefficients = make_vec2((1.f)/((sqrt__glsl_sqrt((2.f)*(3.1415927f)))*(sigma)), exp__glsl_exp((-(0.5f))/((sigma)*(sigma))));
383 vec3_scalar gauss_coefficient = make_vec3(vGaussCoefficients, ((vGaussCoefficients).y)*((vGaussCoefficients).y));
384 float gauss_coefficient_total = (gauss_coefficient).x;
385 for ( int32_t i = 1;
386(i)<=((vSupport).x); i += 2) {
387 (gauss_coefficient).lsel(X,Y) *= (gauss_coefficient).sel(Y,Z);
388 float gauss_coefficient_subtotal = (gauss_coefficient).x;
389 (gauss_coefficient).lsel(X,Y) *= (gauss_coefficient).sel(Y,Z);
390 gauss_coefficient_subtotal += (gauss_coefficient).x;
391 gauss_coefficient_total += (2.f)*(gauss_coefficient_subtotal);
392 }
393 (vGaussCoefficients).x /= gauss_coefficient_total;
394}
395ALWAYS_INLINE__attribute__((always_inline)) inline void main(void) {
396 BlurTask_scalar blur_task = fetch_blur_task(aBlurRenderTaskAddress);
397 RectWithEndpoint_scalar src_rect = fetch_render_task_rect(aBlurSourceTaskAddress);
398 RectWithEndpoint_scalar target_rect = (blur_task).task_rect;
399 vec2_scalar texture_size = make_vec2((textureSize(sColor0, 0)).sel(X,Y));
400 (vSupport).x = (make_int(ceil__glsl_ceil((1.5f)*((blur_task).blur_radius))))*(2);
401 if (((vSupport).x)>(0)) {
402 {
403 calculate_gauss_coefficients((blur_task).blur_radius);
404 }
405 } else {
406 vGaussCoefficients = make_vec2(1.f, 1.f);
407 }
408 switch (aBlurDirection) {
409 case 0:
410 vOffsetScale = make_vec2((1.f)/((texture_size).x), 0.f);
411 break;
412 case 1:
413 vOffsetScale = make_vec2(0.f, (1.f)/((texture_size).y));
414 break;
415 default:
416 vOffsetScale = make_vec2(0.f);
417 }
418 vUvRect = make_vec4(((src_rect).p0)+(make_vec2(0.5f)), (((src_rect).p0)+((blur_task).blur_region))-(make_vec2(0.5f)));
419 vUvRect /= (texture_size).sel(X,Y,X,Y);
420 vec2 pos = mix((target_rect).p0, (target_rect).p1, (aPosition).sel(X,Y));
421 vec2_scalar uv0 = ((src_rect).p0)/(texture_size);
422 vec2_scalar uv1 = ((src_rect).p1)/(texture_size);
423 vUv = mix(uv0, uv1, (aPosition).sel(X,Y));
424 gl_Position = (uTransform)*(make_vec4(pos, 0.f, 1.f));
425}
426static void set_uniform_1i(VertexShaderImpl* impl, int index, int value) {
427 Self* self = (Self*)impl;
428 if (self->samplers.set_slot(index, value)) return;
429 switch (index) {
430 case 7:
431 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sClipMask
432 break;
433 case 8:
434 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sColor0
435 break;
436 case 2:
437 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sGpuCache
438 break;
439 case 4:
440 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersF
441 break;
442 case 5:
443 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersI
444 break;
445 case 1:
446 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sRenderTasks
447 break;
448 case 3:
449 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sTransformPalette
450 break;
451 case 6:
452 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // uTransform
453 break;
454 }
455}
456static void set_uniform_4fv(VertexShaderImpl* impl, int index, const float *value) {
457 Self* self = (Self*)impl;
458 switch (index) {
459 case 7:
460 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sClipMask
461 break;
462 case 8:
463 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sColor0
464 break;
465 case 2:
466 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sGpuCache
467 break;
468 case 4:
469 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersF
470 break;
471 case 5:
472 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersI
473 break;
474 case 1:
475 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sRenderTasks
476 break;
477 case 3:
478 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sTransformPalette
479 break;
480 case 6:
481 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // uTransform
482 break;
483 }
484}
485static void set_uniform_matrix4fv(VertexShaderImpl* impl, int index, const float *value) {
486 Self* self = (Self*)impl;
487 switch (index) {
488 case 7:
489 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sClipMask
490 break;
491 case 8:
492 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sColor0
493 break;
494 case 2:
495 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sGpuCache
496 break;
497 case 4:
498 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersF
499 break;
500 case 5:
501 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sPrimitiveHeadersI
502 break;
503 case 1:
504 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sRenderTasks
505 break;
506 case 3:
507 assert(0)(static_cast <bool> (0) ? void (0) : __assert_fail ("0"
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__
))
; // sTransformPalette
508 break;
509 case 6:
510 self->uTransform = mat4_scalar::load_from_ptr(value);
511 break;
512 }
513}
514static void load_attribs(VertexShaderImpl* impl, VertexAttrib *attribs, uint32_t start, int instance, int count) {Self* self = (Self*)impl;
515 load_attrib(self->aPosition, attribs[self->attrib_locations.aPosition], start, instance, count);
516 load_flat_attrib(self->aBlurRenderTaskAddress, attribs[self->attrib_locations.aBlurRenderTaskAddress], start, instance, count);
517 load_flat_attrib(self->aBlurSourceTaskAddress, attribs[self->attrib_locations.aBlurSourceTaskAddress], start, instance, count);
518 load_flat_attrib(self->aBlurDirection, attribs[self->attrib_locations.aBlurDirection], start, instance, count);
519}
520public:
521struct InterpOutputs {
522vec2_scalar vUv;
523};
524private:
525ALWAYS_INLINE__attribute__((always_inline)) inline void store_interp_outputs(char* dest_ptr, size_t stride) {
526 for(int n = 0; n < 4; n++) {
527 auto* dest = reinterpret_cast<InterpOutputs*>(dest_ptr);
528 dest->vUv = get_nth(vUv, n);
529 dest_ptr += stride;
530 }
531}
532static void run(VertexShaderImpl* impl, char* interps, size_t interp_stride) {
533 Self* self = (Self*)impl;
534 self->main();
535 self->store_interp_outputs(interps, interp_stride);
536}
537static void init_batch(VertexShaderImpl* impl) {
538 Self* self = (Self*)impl; self->bind_textures(); }
539public:
540cs_blur_COLOR_TARGET_vert() {
541 set_uniform_1i_func = &set_uniform_1i;
542 set_uniform_4fv_func = &set_uniform_4fv;
543 set_uniform_matrix4fv_func = &set_uniform_matrix4fv;
544 init_batch_func = &init_batch;
545 load_attribs_func = &load_attribs;
546 run_primitive_func = &run;
547}
548};
549
550
551struct cs_blur_COLOR_TARGET_frag : FragmentShaderImpl, cs_blur_COLOR_TARGET_vert {
552private:
553typedef cs_blur_COLOR_TARGET_frag Self;
554#define oFragColorgl_FragColor gl_FragColor
555// vec4 oFragColor;
556// sampler2D sColor0;
557// sampler2D sColor1;
558// sampler2D sColor2;
559struct RectWithSize_scalar {
560vec2_scalar p0;
561vec2_scalar size;
562RectWithSize_scalar() = default;
563RectWithSize_scalar(vec2_scalar p0, vec2_scalar size) : p0(p0), size(size){}
564};
565struct RectWithSize {
566vec2 p0;
567vec2 size;
568RectWithSize() = default;
569RectWithSize(vec2 p0, vec2 size) : p0(p0), size(size){}
570RectWithSize(vec2_scalar p0, vec2_scalar size):p0(p0),size(size){
571}
572IMPLICIT RectWithSize(RectWithSize_scalar s):p0(s.p0),size(s.size){
573}
574friend RectWithSize if_then_else(I32 c, RectWithSize t, RectWithSize e) { return RectWithSize(
575if_then_else(c, t.p0, e.p0), if_then_else(c, t.size, e.size));
576}};
577struct RectWithEndpoint_scalar {
578vec2_scalar p0;
579vec2_scalar p1;
580RectWithEndpoint_scalar() = default;
581RectWithEndpoint_scalar(vec2_scalar p0, vec2_scalar p1) : p0(p0), p1(p1){}
582};
583struct RectWithEndpoint {
584vec2 p0;
585vec2 p1;
586RectWithEndpoint() = default;
587RectWithEndpoint(vec2 p0, vec2 p1) : p0(p0), p1(p1){}
588RectWithEndpoint(vec2_scalar p0, vec2_scalar p1):p0(p0),p1(p1){
589}
590IMPLICIT RectWithEndpoint(RectWithEndpoint_scalar s):p0(s.p0),p1(s.p1){
591}
592friend RectWithEndpoint if_then_else(I32 c, RectWithEndpoint t, RectWithEndpoint e) { return RectWithEndpoint(
593if_then_else(c, t.p0, e.p0), if_then_else(c, t.p1, e.p1));
594}};
595// sampler2D sGpuCache;
596// vec4_scalar vTransformBounds;
597// sampler2D sClipMask;
598struct Fragment_scalar {
599vec4_scalar color;
600Fragment_scalar() = default;
601explicit Fragment_scalar(vec4_scalar color) : color(color){}
602};
603struct Fragment {
604vec4 color;
605Fragment() = default;
606explicit Fragment(vec4 color) : color(color){}
607explicit Fragment(vec4_scalar color):color(color){
608}
609IMPLICIT Fragment(Fragment_scalar s):color(s.color){
610}
611friend Fragment if_then_else(I32 c, Fragment t, Fragment e) { return Fragment(
612if_then_else(c, t.color, e.color));
613}};
614vec2 vUv;
615// vec4_scalar vUvRect;
616// vec2_scalar vOffsetScale;
617// ivec2_scalar vSupport;
618// vec2_scalar vGaussCoefficients;
619ALWAYS_INLINE__attribute__((always_inline)) inline void main(void) {
620 vec4 original_color = texture(sColor0, vUv);
621 vec3_scalar gauss_coefficient = make_vec3(vGaussCoefficients, ((vGaussCoefficients).y)*((vGaussCoefficients).y));
622 vec4 avg_color = (original_color)*((gauss_coefficient).x);
623 int32_t support = min((vSupport).x, 300);
624 for ( int32_t i = 1;
625(i)<=(support); i += 2) {
626 (gauss_coefficient).lsel(X,Y) *= (gauss_coefficient).sel(Y,Z);
627 float gauss_coefficient_subtotal = (gauss_coefficient).x;
628 (gauss_coefficient).lsel(X,Y) *= (gauss_coefficient).sel(Y,Z);
629 gauss_coefficient_subtotal += (gauss_coefficient).x;
630 float gauss_ratio = ((gauss_coefficient).x)/(gauss_coefficient_subtotal);
631 vec2_scalar offset = (vOffsetScale)*((make_float(i))+(gauss_ratio));
632 vec2 st0 = max((vUv)-(offset), (vUvRect).sel(X,Y));
633 vec2 st1 = min((vUv)+(offset), (vUvRect).sel(Z,W));
634 avg_color += ((texture(sColor0, st0))+(texture(sColor0, st1)))*(gauss_coefficient_subtotal);
635 }
636 oFragColorgl_FragColor = make_vec4(avg_color);
637}
638void swgl_drawSpanRGBA8() {
639 swgl_commitGaussianBlurRGBA8(sColor0, vUv, vUvRect, ((vOffsetScale).x)!=(0.f), (vSupport).x, vGaussCoefficients)do { int drawn = 0; if (blend_key) { drawn = blendGaussianBlur
<true>(sColor0, vUv, vUvRect, swgl_OutRGBA8, swgl_SpanLength
, ((vOffsetScale).x)!=(0.f), (vSupport).x, vGaussCoefficients
); } else { drawn = blendGaussianBlur<false>(sColor0, vUv
, vUvRect, swgl_OutRGBA8, swgl_SpanLength, ((vOffsetScale).x)
!=(0.f), (vSupport).x, vGaussCoefficients); } swgl_OutRGBA8 +=
drawn; swgl_SpanLength -= drawn; } while (0)
;
640}
641typedef cs_blur_COLOR_TARGET_vert::InterpOutputs InterpInputs;
642InterpInputs interp_step;
643struct InterpPerspective {
644vec2 vUv;
645};
646InterpPerspective interp_perspective;
647static void read_interp_inputs(FragmentShaderImpl* impl, const void* init_, const void* step_) {Self* self = (Self*)impl;const InterpInputs* init = (const InterpInputs*)init_;const InterpInputs* step = (const InterpInputs*)step_;
648 self->vUv = init_interp(init->vUv, step->vUv);
649 self->interp_step.vUv = step->vUv * 4.0f;
650}
651static void read_perspective_inputs(FragmentShaderImpl* impl, const void* init_, const void* step_) {Self* self = (Self*)impl;const InterpInputs* init = (const InterpInputs*)init_;const InterpInputs* step = (const InterpInputs*)step_;
652 Float w = 1.0f / self->gl_FragCoord.w;
653 self->interp_perspective.vUv = init_interp(init->vUv, step->vUv);
654 self->vUv = self->interp_perspective.vUv * w;
655 self->interp_step.vUv = step->vUv * 4.0f;
656}
657ALWAYS_INLINE__attribute__((always_inline)) inline void step_interp_inputs(int steps = 4) {
658 float chunks = steps * 0.25f;
659 vUv += interp_step.vUv * chunks;
660}
661ALWAYS_INLINE__attribute__((always_inline)) inline void step_perspective_inputs(int steps = 4) {
662 step_perspective(steps);
663 float chunks = steps * 0.25f;
664 Float w = 1.0f / gl_FragCoord.w;
665 interp_perspective.vUv += interp_step.vUv * chunks;
666 vUv = w * interp_perspective.vUv;
667}
668static void run(FragmentShaderImpl* impl) {
669 Self* self = (Self*)impl;
670 self->main();
671 self->step_interp_inputs();
672}
673static void skip(FragmentShaderImpl* impl, int steps) {
674 Self* self = (Self*)impl;
675 self->step_interp_inputs(steps);
676}
677static void run_perspective(FragmentShaderImpl* impl) {
678 Self* self = (Self*)impl;
679 self->main();
680 self->step_perspective_inputs();
681}
682static void skip_perspective(FragmentShaderImpl* impl, int steps) {
683 Self* self = (Self*)impl;
684 self->step_perspective_inputs(steps);
685}
686static int draw_span_RGBA8(FragmentShaderImpl* impl) {
687 Self* self = (Self*)impl; DISPATCH_DRAW_SPAN(self, RGBA8)do { int total = self->swgl_SpanLength; self->swgl_drawSpanRGBA8
(); int drawn = total - self->swgl_SpanLength; if (drawn) self
->step_interp_inputs(drawn); return drawn; } while (0)
; }
688public:
689cs_blur_COLOR_TARGET_frag() {
690 init_span_func = &read_interp_inputs;
691 run_func = &run;
692 skip_func = &skip;
693 draw_span_RGBA8_func = &draw_span_RGBA8;
694 enable_perspective();
695 init_span_w_func = &read_perspective_inputs;
696 run_w_func = &run_perspective;
697 skip_w_func = &skip_perspective;
698}
699};
700
701struct cs_blur_COLOR_TARGET_program : ProgramImpl, cs_blur_COLOR_TARGET_frag {
702int get_uniform(const char *name) const override {
703 if (strcmp("sClipMask", name) == 0) { return 7; }
704 if (strcmp("sColor0", name) == 0) { return 8; }
705 if (strcmp("sGpuCache", name) == 0) { return 2; }
706 if (strcmp("sPrimitiveHeadersF", name) == 0) { return 4; }
707 if (strcmp("sPrimitiveHeadersI", name) == 0) { return 5; }
708 if (strcmp("sRenderTasks", name) == 0) { return 1; }
709 if (strcmp("sTransformPalette", name) == 0) { return 3; }
710 if (strcmp("uTransform", name) == 0) { return 6; }
711 return -1;
712}
713void bind_attrib(const char* name, int index) override {
714 attrib_locations.bind_loc(name, index);
715}
716int get_attrib(const char* name) const override {
717 return attrib_locations.get_loc(name);
718}
719size_t interpolants_size() const override { return sizeof(InterpOutputs); }
720VertexShaderImpl* get_vertex_shader() override {
721 return this;
722}
723FragmentShaderImpl* get_fragment_shader() override {
724 return this;
725}
726const char* get_name() const override { return "cs_blur_COLOR_TARGET"; }
727static ProgramImpl* loader() { return new cs_blur_COLOR_TARGET_program; }
728};
729