2 * Mesa 3-D graphics library
4 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
29 #include "main/mtypes.h"
32 * \name Flags for meta operations
35 * These flags are passed to _mesa_meta_begin().
37 #define MESA_META_ALL ~0x0
38 #define MESA_META_ALPHA_TEST 0x1
39 #define MESA_META_BLEND 0x2 /**< includes logicop */
40 #define MESA_META_COLOR_MASK 0x4
41 #define MESA_META_DEPTH_TEST 0x8
42 #define MESA_META_FOG 0x10
43 #define MESA_META_PIXEL_STORE 0x20
44 #define MESA_META_PIXEL_TRANSFER 0x40
45 #define MESA_META_RASTERIZATION 0x80
46 #define MESA_META_SCISSOR 0x100
47 #define MESA_META_SHADER 0x200
48 #define MESA_META_STENCIL_TEST 0x400
49 #define MESA_META_TRANSFORM 0x800 /**< modelview/projection matrix state */
50 #define MESA_META_TEXTURE 0x1000
51 #define MESA_META_VERTEX 0x2000
52 #define MESA_META_VIEWPORT 0x4000
53 #define MESA_META_CLAMP_FRAGMENT_COLOR 0x8000
54 #define MESA_META_CLAMP_VERTEX_COLOR 0x10000
55 #define MESA_META_CONDITIONAL_RENDER 0x20000
56 #define MESA_META_CLIP 0x40000
57 #define MESA_META_SELECT_FEEDBACK 0x80000
58 #define MESA_META_MULTISAMPLE 0x100000
59 #define MESA_META_FRAMEBUFFER_SRGB 0x200000
60 #define MESA_META_OCCLUSION_QUERY 0x400000
61 #define MESA_META_DRAW_BUFFERS 0x800000
62 #define MESA_META_DITHER 0x1000000
66 * State which we may save/restore across meta ops.
67 * XXX this may be incomplete...
71 GLbitfield SavedState
; /**< bitmask of MESA_META_* flags */
73 /* Always saved/restored with meta. */
75 uint8_t ExtensionsVersion
;
77 /** MESA_META_CLEAR (and others?) */
78 struct gl_query_object
*CurrentOcclusionObject
;
80 /** MESA_META_ALPHA_TEST */
81 GLboolean AlphaEnabled
;
85 /** MESA_META_BLEND */
86 GLbitfield BlendEnabled
;
87 GLboolean ColorLogicOpEnabled
;
89 /** MESA_META_DITHER */
92 /** MESA_META_COLOR_MASK */
93 GLubyte ColorMask
[MAX_DRAW_BUFFERS
][4];
95 /** MESA_META_DEPTH_TEST */
96 struct gl_depthbuffer_attrib Depth
;
101 /** MESA_META_PIXEL_STORE */
102 struct gl_pixelstore_attrib Pack
, Unpack
;
104 /** MESA_META_PIXEL_TRANSFER */
105 GLfloat RedBias
, RedScale
;
106 GLfloat GreenBias
, GreenScale
;
107 GLfloat BlueBias
, BlueScale
;
108 GLfloat AlphaBias
, AlphaScale
;
109 GLfloat DepthBias
, DepthScale
;
110 GLboolean MapColorFlag
;
112 /** MESA_META_RASTERIZATION */
113 GLenum FrontPolygonMode
, BackPolygonMode
;
114 GLboolean PolygonOffset
;
115 GLboolean PolygonSmooth
;
116 GLboolean PolygonStipple
;
117 GLboolean PolygonCull
;
119 /** MESA_META_SCISSOR */
120 struct gl_scissor_attrib Scissor
;
122 /** MESA_META_SHADER */
123 GLboolean VertexProgramEnabled
;
124 struct gl_vertex_program
*VertexProgram
;
125 GLboolean FragmentProgramEnabled
;
126 struct gl_fragment_program
*FragmentProgram
;
127 GLboolean ATIFragmentShaderEnabled
;
128 struct gl_shader_program
*Shader
[MESA_SHADER_STAGES
];
129 struct gl_shader_program
*ActiveShader
;
130 struct gl_pipeline_object
*Pipeline
;
132 /** MESA_META_STENCIL_TEST */
133 struct gl_stencil_attrib Stencil
;
135 /** MESA_META_TRANSFORM */
137 GLfloat ModelviewMatrix
[16];
138 GLfloat ProjectionMatrix
[16];
139 GLfloat TextureMatrix
[16];
140 /** GL_ARB_clip_control */
141 GLenum ClipOrigin
; /**< GL_LOWER_LEFT or GL_UPPER_LEFT */
142 GLenum ClipDepthMode
; /**< GL_NEGATIVE_ONE_TO_ONE or GL_ZERO_TO_ONE */
144 /** MESA_META_CLIP */
145 GLbitfield ClipPlanesEnabled
;
147 /** MESA_META_TEXTURE */
149 GLuint ClientActiveUnit
;
150 /** for unit[0] only */
151 struct gl_texture_object
*CurrentTexture
[NUM_TEXTURE_TARGETS
];
152 /** mask of TEXTURE_2D_BIT, etc */
153 GLbitfield TexEnabled
[MAX_TEXTURE_UNITS
];
154 GLbitfield TexGenEnabled
[MAX_TEXTURE_UNITS
];
155 GLuint EnvMode
; /* unit[0] only */
157 /** MESA_META_VERTEX */
158 struct gl_vertex_array_object
*VAO
;
159 struct gl_buffer_object
*ArrayBufferObj
;
161 /** MESA_META_VIEWPORT */
162 GLfloat ViewportX
, ViewportY
, ViewportW
, ViewportH
;
163 GLclampd DepthNear
, DepthFar
;
165 /** MESA_META_CLAMP_FRAGMENT_COLOR */
166 GLenum ClampFragmentColor
;
168 /** MESA_META_CLAMP_VERTEX_COLOR */
169 GLenum ClampVertexColor
;
171 /** MESA_META_CONDITIONAL_RENDER */
172 struct gl_query_object
*CondRenderQuery
;
173 GLenum CondRenderMode
;
175 /** MESA_META_SELECT_FEEDBACK */
177 struct gl_selection Select
;
178 struct gl_feedback Feedback
;
180 /** MESA_META_MULTISAMPLE */
181 struct gl_multisample_attrib Multisample
;
183 /** MESA_META_FRAMEBUFFER_SRGB */
184 GLboolean sRGBEnabled
;
186 /** Miscellaneous (always disabled) */
188 GLboolean RasterDiscard
;
189 GLboolean TransformFeedbackNeedsResume
;
191 GLuint DrawBufferName
, ReadBufferName
, RenderbufferName
;
193 /** MESA_META_DRAW_BUFFERS */
194 GLenum ColorDrawBuffers
[MAX_DRAW_BUFFERS
];
198 * Temporary texture used for glBlitFramebuffer, glDrawPixels, etc.
199 * This is currently shared by all the meta ops. But we could create a
200 * separate one for each of glDrawPixel, glBlitFramebuffer, glCopyPixels, etc.
205 GLenum Target
; /**< GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE */
206 GLsizei MinSize
; /**< Min texture size to allocate */
207 GLsizei MaxSize
; /**< Max possible texture size */
208 GLboolean NPOT
; /**< Non-power of two size OK? */
209 GLsizei Width
, Height
; /**< Current texture size */
211 GLfloat Sright
, Ttop
; /**< right, top texcoords */
215 * State for GLSL texture sampler which is used to generate fragment
216 * shader in _mesa_meta_generate_mipmap().
221 const char *texcoords
;
226 * Table of all sampler types and shaders for accessing them.
228 struct blit_shader_table
{
229 struct blit_shader sampler_1d
;
230 struct blit_shader sampler_2d
;
231 struct blit_shader sampler_3d
;
232 struct blit_shader sampler_rect
;
233 struct blit_shader sampler_cubemap
;
234 struct blit_shader sampler_1d_array
;
235 struct blit_shader sampler_2d_array
;
236 struct blit_shader sampler_cubemap_array
;
240 * Indices in the blit_state->msaa_shaders[] array
242 * Note that setup_glsl_msaa_blit_shader() assumes that the _INT enums are five
243 * more than the corresponding non-_INT versions and _UINT are five beyond that.
245 enum blit_msaa_shader
{
246 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE
,
247 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE
,
248 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE
,
249 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE
,
250 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE
,
251 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT
,
252 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT
,
253 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT
,
254 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT
,
255 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_INT
,
256 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT
,
257 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT
,
258 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT
,
259 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT
,
260 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_RESOLVE_UINT
,
261 BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY
,
262 BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_INT
,
263 BLIT_MSAA_SHADER_2D_MULTISAMPLE_COPY_UINT
,
264 BLIT_MSAA_SHADER_2D_MULTISAMPLE_DEPTH_RESOLVE
,
265 BLIT_MSAA_SHADER_2D_MULTISAMPLE_DEPTH_COPY
,
266 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE
,
267 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE
,
268 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE
,
269 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE
,
270 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE
,
271 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT
,
272 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT
,
273 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT
,
274 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT
,
275 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_INT
,
276 BLIT_1X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT
,
277 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT
,
278 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT
,
279 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT
,
280 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_RESOLVE_UINT
,
281 BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY
,
282 BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY_INT
,
283 BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_COPY_UINT
,
284 BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_DEPTH_RESOLVE
,
285 BLIT_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_DEPTH_COPY
,
286 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_SCALED_RESOLVE
,
287 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_SCALED_RESOLVE
,
288 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_SCALED_RESOLVE
,
289 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_SCALED_RESOLVE
,
290 BLIT_2X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_SCALED_RESOLVE
,
291 BLIT_4X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_SCALED_RESOLVE
,
292 BLIT_8X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_SCALED_RESOLVE
,
293 BLIT_16X_MSAA_SHADER_2D_MULTISAMPLE_ARRAY_SCALED_RESOLVE
,
294 BLIT_MSAA_SHADER_COUNT
,
298 * State for glBlitFramebufer()
303 struct gl_buffer_object
*buf_obj
;
304 struct blit_shader_table shaders_with_depth
;
305 struct blit_shader_table shaders_without_depth
;
306 GLuint msaa_shaders
[BLIT_MSAA_SHADER_COUNT
];
307 struct temp_texture depthTex
;
308 bool no_ctsi_fallback
;
311 struct fb_tex_blit_state
313 GLint baseLevelSave
, maxLevelSave
;
314 GLuint sampler
, samplerSave
, stencilSamplingSave
;
320 * State for glClear()
325 struct gl_buffer_object
*buf_obj
;
330 GLuint IntegerShaderProg
;
331 GLint IntegerColorLocation
;
332 GLint IntegerLayerLocation
;
337 * State for glCopyPixels()
342 struct gl_buffer_object
*buf_obj
;
347 * State for glDrawPixels()
352 struct gl_buffer_object
*buf_obj
;
354 GLuint StencilFP
; /**< Fragment program for drawing stencil images */
355 GLuint DepthFP
; /**< Fragment program for drawing depth images */
360 * State for glBitmap()
365 struct gl_buffer_object
*buf_obj
;
366 struct temp_texture Tex
; /**< separate texture from other meta ops */
370 * State for _mesa_meta_generate_mipmap()
372 struct gen_mipmap_state
375 struct gl_buffer_object
*buf_obj
;
379 struct blit_shader_table shaders
;
383 * One of the FBO states for decompress_state. There will be one for each
384 * required renderbuffer format.
386 struct decompress_fbo_state
393 * State for texture decompression
395 struct decompress_state
398 struct decompress_fbo_state byteFBO
, floatFBO
;
399 struct gl_buffer_object
*buf_obj
;
402 struct blit_shader_table shaders
;
406 * State for glDrawTex()
411 struct gl_buffer_object
*buf_obj
;
414 #define MAX_META_OPS_DEPTH 8
416 * All per-context meta state.
420 /** Stack of state saved during meta-ops */
421 struct save_state Save
[MAX_META_OPS_DEPTH
];
422 /** Save stack depth */
423 GLuint SaveStackDepth
;
425 struct temp_texture TempTex
;
427 struct blit_state Blit
; /**< For _mesa_meta_BlitFramebuffer() */
428 struct clear_state Clear
; /**< For _mesa_meta_Clear() */
429 struct copypix_state CopyPix
; /**< For _mesa_meta_CopyPixels() */
430 struct drawpix_state DrawPix
; /**< For _mesa_meta_DrawPixels() */
431 struct bitmap_state Bitmap
; /**< For _mesa_meta_Bitmap() */
432 struct gen_mipmap_state Mipmap
; /**< For _mesa_meta_GenerateMipmap() */
433 struct decompress_state Decompress
; /**< For texture decompression */
434 struct drawtex_state DrawTex
; /**< For _mesa_meta_DrawTex() */
438 GLfloat x
, y
, z
, tex
[4];
443 _mesa_meta_init(struct gl_context
*ctx
);
446 _mesa_meta_free(struct gl_context
*ctx
);
449 _mesa_meta_begin(struct gl_context
*ctx
, GLbitfield state
);
452 _mesa_meta_end(struct gl_context
*ctx
);
455 _mesa_meta_in_progress(struct gl_context
*ctx
)
457 return ctx
->Meta
->SaveStackDepth
!= 0;
461 _mesa_meta_fb_tex_blit_begin(const struct gl_context
*ctx
,
462 struct fb_tex_blit_state
*blit
);
465 _mesa_meta_fb_tex_blit_end(struct gl_context
*ctx
, GLenum target
,
466 struct fb_tex_blit_state
*blit
);
469 _mesa_meta_bind_rb_as_tex_image(struct gl_context
*ctx
,
470 struct gl_renderbuffer
*rb
,
472 struct gl_texture_object
**texObj
,
476 _mesa_meta_setup_sampler(struct gl_context
*ctx
,
477 const struct gl_texture_object
*texObj
,
478 GLenum target
, GLenum filter
, GLuint srcLevel
);
481 _mesa_meta_BlitFramebuffer(struct gl_context
*ctx
,
482 const struct gl_framebuffer
*readFb
,
483 const struct gl_framebuffer
*drawFb
,
484 GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
485 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
486 GLbitfield mask
, GLenum filter
);
489 _mesa_meta_and_swrast_BlitFramebuffer(struct gl_context
*ctx
,
490 struct gl_framebuffer
*readFb
,
491 struct gl_framebuffer
*drawFb
,
492 GLint srcX0
, GLint srcY0
,
493 GLint srcX1
, GLint srcY1
,
494 GLint dstX0
, GLint dstY0
,
495 GLint dstX1
, GLint dstY1
,
496 GLbitfield mask
, GLenum filter
);
499 _mesa_meta_CopyImageSubData_uncompressed(struct gl_context
*ctx
,
500 struct gl_texture_image
*src_tex_image
,
501 struct gl_renderbuffer
*src_renderbuffer
,
502 int src_x
, int src_y
, int src_z
,
503 struct gl_texture_image
*dst_tex_image
,
504 struct gl_renderbuffer
*dst_renderbuffer
,
505 int dst_x
, int dst_y
, int dst_z
,
506 int src_width
, int src_height
);
509 _mesa_meta_Clear(struct gl_context
*ctx
, GLbitfield buffers
);
512 _mesa_meta_glsl_Clear(struct gl_context
*ctx
, GLbitfield buffers
);
515 _mesa_meta_CopyPixels(struct gl_context
*ctx
, GLint srcx
, GLint srcy
,
516 GLsizei width
, GLsizei height
,
517 GLint dstx
, GLint dsty
, GLenum type
);
520 _mesa_meta_DrawPixels(struct gl_context
*ctx
,
521 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
522 GLenum format
, GLenum type
,
523 const struct gl_pixelstore_attrib
*unpack
,
524 const GLvoid
*pixels
);
527 _mesa_meta_Bitmap(struct gl_context
*ctx
,
528 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
529 const struct gl_pixelstore_attrib
*unpack
,
530 const GLubyte
*bitmap
);
533 _mesa_meta_GenerateMipmap(struct gl_context
*ctx
, GLenum target
,
534 struct gl_texture_object
*texObj
);
537 _mesa_meta_pbo_TexSubImage(struct gl_context
*ctx
, GLuint dims
,
538 struct gl_texture_image
*tex_image
,
539 int xoffset
, int yoffset
, int zoffset
,
540 int width
, int height
, int depth
,
541 GLenum format
, GLenum type
, const void *pixels
,
542 bool allocate_storage
, bool create_pbo
,
543 const struct gl_pixelstore_attrib
*packing
);
546 _mesa_meta_pbo_GetTexSubImage(struct gl_context
*ctx
, GLuint dims
,
547 struct gl_texture_image
*tex_image
,
548 int xoffset
, int yoffset
, int zoffset
,
549 int width
, int height
, int depth
,
550 GLenum format
, GLenum type
, const void *pixels
,
551 const struct gl_pixelstore_attrib
*packing
);
554 _mesa_meta_CopyTexSubImage(struct gl_context
*ctx
, GLuint dims
,
555 struct gl_texture_image
*texImage
,
556 GLint xoffset
, GLint yoffset
, GLint slice
,
557 struct gl_renderbuffer
*rb
,
559 GLsizei width
, GLsizei height
);
562 _mesa_meta_ClearTexSubImage(struct gl_context
*ctx
,
563 struct gl_texture_image
*texImage
,
564 GLint xoffset
, GLint yoffset
, GLint zoffset
,
565 GLsizei width
, GLsizei height
, GLsizei depth
,
566 const GLvoid
*clearValue
);
569 _mesa_meta_GetTexSubImage(struct gl_context
*ctx
,
570 GLint xoffset
, GLint yoffset
, GLint zoffset
,
571 GLsizei width
, GLsizei height
, GLsizei depth
,
572 GLenum format
, GLenum type
, GLvoid
*pixels
,
573 struct gl_texture_image
*texImage
);
576 _mesa_meta_DrawTex(struct gl_context
*ctx
, GLfloat x
, GLfloat y
, GLfloat z
,
577 GLfloat width
, GLfloat height
);
579 /* meta-internal functions */
581 _mesa_meta_drawbuffers_from_bitfield(GLbitfield bits
);
584 _mesa_meta_compile_shader_with_debug(struct gl_context
*ctx
, GLenum target
,
585 const GLcharARB
*source
);
589 _mesa_meta_link_program_with_debug(struct gl_context
*ctx
, GLuint program
);
592 _mesa_meta_compile_and_link_program(struct gl_context
*ctx
,
593 const char *vs_source
,
594 const char *fs_source
,
599 _mesa_meta_alloc_texture(struct temp_texture
*tex
,
600 GLsizei width
, GLsizei height
, GLenum intFormat
);
603 _mesa_meta_setup_texture_coords(GLenum faceTarget
,
617 struct temp_texture
*
618 _mesa_meta_get_temp_texture(struct gl_context
*ctx
);
620 struct temp_texture
*
621 _mesa_meta_get_temp_depth_texture(struct gl_context
*ctx
);
624 _mesa_meta_setup_vertex_objects(struct gl_context
*ctx
,
625 GLuint
*VAO
, struct gl_buffer_object
**buf_obj
,
626 bool use_generic_attributes
,
627 unsigned vertex_size
, unsigned texcoord_size
,
628 unsigned color_size
);
631 _mesa_meta_setup_ff_tnl_for_blit(struct gl_context
*ctx
,
632 GLuint
*VAO
, struct gl_buffer_object
**buf_obj
,
633 unsigned texcoord_size
);
636 _mesa_meta_setup_drawpix_texture(struct gl_context
*ctx
,
637 struct temp_texture
*tex
,
639 GLsizei width
, GLsizei height
,
640 GLenum format
, GLenum type
,
641 const GLvoid
*pixels
);
644 _mesa_meta_setup_copypix_texture(struct gl_context
*ctx
,
645 struct temp_texture
*tex
,
646 GLint srcX
, GLint srcY
,
647 GLsizei width
, GLsizei height
,
652 _mesa_meta_setup_blit_shader(struct gl_context
*ctx
,
655 struct blit_shader_table
*table
);
658 _mesa_meta_glsl_blit_cleanup(struct blit_state
*blit
);
661 _mesa_meta_blit_shader_table_cleanup(struct blit_shader_table
*table
);
664 _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state
*mipmap
);
667 _mesa_meta_bind_fbo_image(GLenum target
, GLenum attachment
,
668 struct gl_texture_image
*texImage
, GLuint layer
);