@@ -51,7 +51,13 @@ DECL_BEGIN
5151/* Empty GFX operators */
5252INTERN ATTR_RETNONNULL ATTR_INOUT (1 ) struct video_blitter * FCC
5353libvideo_emptygfx_blitfrom (struct video_blitter * __restrict ctx ) {
54- ctx -> vbt_ops = & libvideo_blit_empty_ops ;
54+ ctx -> vbt_ops = & libvideo_emptyblitter_ops ;
55+ return ctx ;
56+ }
57+
58+ INTERN ATTR_RETNONNULL ATTR_INOUT (1 ) struct video_blitter3 * FCC
59+ libvideo_emptygfx_blitfrom3 (struct video_blitter3 * __restrict ctx ) {
60+ ctx -> vbt3_ops = & libvideo_emptyblitter3_ops ;
5561 return ctx ;
5662}
5763
@@ -70,8 +76,6 @@ libvideo_emptygfx_clip(struct video_gfx *__restrict self,
7076 return self ;
7177}
7278
73- #define libvideo_emptygfx_coord2offset \
74- (*(bool (CC *)(struct video_gfx const *__restrict, video_coord_t, video_coord_t, video_offset_t[2]))&libvideo_emptygfx_offset2coord)
7579INTERN WUNUSED ATTR_IN (1 ) ATTR_OUT (4 ) bool CC
7680libvideo_emptygfx_offset2coord (struct video_gfx const * __restrict self ,
7781 video_offset_t x , video_offset_t y ,
@@ -161,19 +165,42 @@ libvideo_emptygfx_fillstretchmask(struct video_gfx const *__restrict UNUSED(self
161165}
162166
163167INTERN ATTR_IN (1 ) ATTR_IN (4 ) void CC
164- libvideo_emptygfx_bitblit (struct video_gfx const * __restrict UNUSED (dst ),
168+ libvideo_emptygfx_bitblit (struct video_gfx const * UNUSED (dst ),
165169 video_offset_t UNUSED (dst_x ), video_offset_t UNUSED (dst_y ),
166- struct video_gfx const * __restrict UNUSED (src ),
170+ struct video_gfx const * UNUSED (src ),
167171 video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
168172 video_dim_t UNUSED (size_x ), video_dim_t UNUSED (size_y )) {
169173 COMPILER_IMPURE ();
170174}
171175
172176INTERN ATTR_IN (1 ) ATTR_IN (6 ) void CC
173- libvideo_emptygfx_stretch (struct video_gfx const * __restrict UNUSED (dst ),
177+ libvideo_emptygfx_stretch (struct video_gfx const * UNUSED (dst ),
174178 video_offset_t UNUSED (dst_x ), video_offset_t UNUSED (dst_y ),
175179 video_dim_t UNUSED (dst_size_x ), video_dim_t UNUSED (dst_size_y ),
176- struct video_gfx const * __restrict UNUSED (src ),
180+ struct video_gfx const * UNUSED (src ),
181+ video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
182+ video_dim_t UNUSED (src_size_x ), video_dim_t UNUSED (src_size_y )) {
183+ COMPILER_IMPURE ();
184+ }
185+
186+ INTERN ATTR_IN (1 ) ATTR_IN (4 ) ATTR_IN (7 ) void CC
187+ libvideo_emptygfx_bitblit3 (struct video_gfx const * UNUSED (wrdst ),
188+ video_offset_t UNUSED (wrdst_x ), video_offset_t UNUSED (wrdst_y ),
189+ struct video_gfx const * UNUSED (rddst ),
190+ video_offset_t UNUSED (rddst_x ), video_offset_t UNUSED (rddst_y ),
191+ struct video_gfx const * UNUSED (src ),
192+ video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
193+ video_dim_t UNUSED (size_x ), video_dim_t UNUSED (size_y )) {
194+ COMPILER_IMPURE ();
195+ }
196+
197+ INTERN ATTR_IN (1 ) ATTR_IN (4 ) ATTR_IN (9 ) void CC
198+ libvideo_emptygfx_stretch3 (struct video_gfx const * UNUSED (wrdst ),
199+ video_offset_t UNUSED (wrdst_x ), video_offset_t UNUSED (wrdst_y ),
200+ struct video_gfx const * UNUSED (rddst ),
201+ video_offset_t UNUSED (rddst_x ), video_offset_t UNUSED (rddst_y ),
202+ video_dim_t UNUSED (dst_size_x ), video_dim_t UNUSED (dst_size_y ),
203+ struct video_gfx const * UNUSED (src ),
177204 video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
178205 video_dim_t UNUSED (src_size_x ), video_dim_t UNUSED (src_size_y )) {
179206 COMPILER_IMPURE ();
@@ -185,11 +212,14 @@ PRIVATE struct video_gfx_ops libvideo_emptygfx_ops = {};
185212INTERN ATTR_RETNONNULL WUNUSED struct video_gfx_ops const * CC _libvideo_emptygfx_ops (void ) {
186213 if unlikely (!libvideo_emptygfx_ops .vgfo_getcolor ) {
187214 libvideo_emptygfx_ops .vgfo_blitfrom = & libvideo_emptygfx_blitfrom ;
215+ libvideo_emptygfx_ops .vgfo_blitfrom3 = & libvideo_emptygfx_blitfrom3 ;
188216 libvideo_emptygfx_ops .vgfo_clip = & libvideo_emptygfx_clip ;
189217 libvideo_emptygfx_ops .vgfo_coord2offset = & libvideo_emptygfx_coord2offset ;
190218 libvideo_emptygfx_ops .vgfo_offset2coord = & libvideo_emptygfx_offset2coord ;
191219 libvideo_emptygfx_ops .vgfo_bitblit = & libvideo_emptygfx_bitblit ;
192220 libvideo_emptygfx_ops .vgfo_stretch = & libvideo_emptygfx_stretch ;
221+ libvideo_emptygfx_ops .vgfo_bitblit3 = & libvideo_emptygfx_bitblit3 ;
222+ libvideo_emptygfx_ops .vgfo_stretch3 = & libvideo_emptygfx_stretch3 ;
193223 libvideo_emptygfx_ops .vgfo_vgradient = & libvideo_emptygfx_vgradient ;
194224 libvideo_emptygfx_ops .vgfo_hgradient = & libvideo_emptygfx_hgradient ;
195225 libvideo_emptygfx_ops .vgfo_gradient = & libvideo_emptygfx_gradient ;
@@ -227,18 +257,53 @@ libvideo_emptyblitter_stretch(struct video_blitter const *__restrict UNUSED(self
227257 COMPILER_IMPURE ();
228258}
229259
230- #undef libvideo_blit_empty_ops
231- PRIVATE struct video_blitter_ops libvideo_blit_empty_ops = {};
232- INTERN ATTR_RETNONNULL WUNUSED struct video_blitter_ops const * CC _libvideo_blit_empty_ops (void ) {
233- if unlikely (!libvideo_blit_empty_ops .vbto_bitblit ) {
234- libvideo_blit_empty_ops .vbto_stretch = & libvideo_emptyblitter_stretch ;
260+ #undef libvideo_emptyblitter_ops
261+ PRIVATE struct video_blitter_ops libvideo_emptyblitter_ops = {};
262+ INTERN ATTR_RETNONNULL WUNUSED struct video_blitter_ops const * CC _libvideo_emptyblitter_ops (void ) {
263+ if unlikely (!libvideo_emptyblitter_ops .vbto_bitblit ) {
264+ libvideo_emptyblitter_ops .vbto_stretch = & libvideo_emptyblitter_stretch ;
265+ COMPILER_WRITE_BARRIER ();
266+ libvideo_emptyblitter_ops .vbto_bitblit = & libvideo_emptyblitter_blit ;
267+ COMPILER_WRITE_BARRIER ();
268+ }
269+ return & libvideo_emptyblitter_ops ;
270+ }
271+ #define libvideo_emptyblitter_ops (*_libvideo_emptyblitter_ops())
272+
273+
274+
275+ /* Empty blit3 operators */
276+ INTERN ATTR_IN (1 ) void CC
277+ libvideo_emptyblitter3_blit (struct video_blitter3 const * __restrict UNUSED (self ),
278+ video_offset_t UNUSED (wrdst_x ), video_offset_t UNUSED (wrdst_y ),
279+ video_offset_t UNUSED (rddst_x ), video_offset_t UNUSED (rddst_y ),
280+ video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
281+ video_dim_t UNUSED (size_x ), video_dim_t UNUSED (size_y )) {
282+ COMPILER_IMPURE ();
283+ }
284+
285+ INTERN ATTR_IN (1 ) void CC
286+ libvideo_emptyblitter3_stretch (struct video_blitter3 const * __restrict UNUSED (self ),
287+ video_offset_t UNUSED (wrdst_x ), video_offset_t UNUSED (wrdst_y ),
288+ video_offset_t UNUSED (rddst_x ), video_offset_t UNUSED (rddst_y ),
289+ video_dim_t UNUSED (dst_size_x ), video_dim_t UNUSED (dst_size_y ),
290+ video_offset_t UNUSED (src_x ), video_offset_t UNUSED (src_y ),
291+ video_dim_t UNUSED (src_size_x ), video_dim_t UNUSED (src_size_y )) {
292+ COMPILER_IMPURE ();
293+ }
294+
295+ #undef libvideo_emptyblitter3_ops
296+ PRIVATE struct video_blitter3_ops libvideo_emptyblitter3_ops = {};
297+ INTERN ATTR_RETNONNULL WUNUSED struct video_blitter3_ops const * CC _libvideo_emptyblitter3_ops (void ) {
298+ if unlikely (!libvideo_emptyblitter3_ops .vbt3o_bitblit ) {
299+ libvideo_emptyblitter3_ops .vbt3o_stretch = & libvideo_emptyblitter3_stretch ;
235300 COMPILER_WRITE_BARRIER ();
236- libvideo_blit_empty_ops . vbto_bitblit = & libvideo_emptyblitter_blit ;
301+ libvideo_emptyblitter3_ops . vbt3o_bitblit = & libvideo_emptyblitter3_blit ;
237302 COMPILER_WRITE_BARRIER ();
238303 }
239- return & libvideo_blit_empty_ops ;
304+ return & libvideo_emptyblitter3_ops ;
240305}
241- #define libvideo_blit_empty_ops (*_libvideo_blit_empty_ops ())
306+ #define libvideo_emptyblitter3_ops (*_libvideo_emptyblitter3_ops ())
242307
243308
244309
0 commit comments