Home | History | Annotate | Download | only in main

Lines Matching refs:Format

85                                   GLenum format, GLenum type,
90 GLenum dstBaseFormat = _mesa_unpack_format_to_base_format(format);
92 if (format == GL_DEPTH_COMPONENT ||
93 format == GL_DEPTH_STENCIL ||
94 format == GL_STENCIL_INDEX) {
101 if (_mesa_is_enum_format_integer(format)) {
122 /* If the format is unsigned normalized, we can ignore clamping
141 * NOTE: This doesn't take swizzling and format conversions between
145 _mesa_readpixels_needs_slow_path(const struct gl_context *ctx, GLenum format,
149 _mesa_get_read_renderbuffer_for_format(ctx, format);
150 GLenum dstBaseFormat = _mesa_unpack_format_to_base_format(format);
154 /* There are different rules depending on the base format. */
155 switch (format) {
177 return _mesa_get_readpixels_transfer_ops(ctx, rb->Format, format, type,
185 readpixels_can_use_memcpy(const struct gl_context *ctx, GLenum format, GLenum type,
189 _mesa_get_read_renderbuffer_for_format(ctx, format);
193 if (_mesa_readpixels_needs_slow_path(ctx, format, type, GL_FALSE)) {
197 /* The base internal format and the base Mesa format must match. */
198 if (rb->_BaseFormat != _mesa_get_format_base_format(rb->Format)) {
202 /* The Mesa format must match the input format and type. */
203 if (!_mesa_format_matches_format_and_type(rb->Format, format, type,
216 GLenum format, GLenum type,
221 _mesa_get_read_renderbuffer_for_format(ctx, format);
226 if (!readpixels_can_use_memcpy(ctx, format, type, packing)) {
230 dstStride = _mesa_image_row_stride(packing, width, format, type);
232 format, type, 0, 0);
241 texelBytes = _mesa_get_format_bytes(rb->Format);
277 if (_mesa_get_format_datatype(rb->Format) != GL_UNSIGNED_NORMALIZED)
293 _mesa_unpack_uint_z_row(rb->Format, width, map, (GLuint *)dst);
304 * Read pixels for format=GL_DEPTH_COMPONENT.
350 _mesa_unpack_float_z_row(rb->Format, width, map, depthValues);
368 * Read pixels for format=GL_STENCIL_INDEX.
400 _mesa_unpack_ubyte_stencil_row(rb->Format, width, map, stencil);
425 GLenum format, GLenum type, GLvoid *pixels,
440 GLenum dstBaseFormat = _mesa_unpack_format_to_base_format(format);
445 transferOps = _mesa_get_readpixels_transfer_ops(ctx, rb->Format, format,
447 /* Describe the dst format */
448 dst_is_integer = _mesa_is_enum_format_integer(format);
449 dst_stride = _mesa_image_row_stride(packing, width, format, type);
450 dst_format = _mesa_format_from_format_and_type(format, type);
454 format, type, 0, 0);
463 rb_format = _mesa_get_srgb_format_linear(rb->Format);
491 * first so we can call _mesa_apply_rgba_transfer_ops. If the dst format is
522 /* If we are lucky and the dst format matches the RGBA format we need to
552 /* If we were lucky and our RGBA conversion matches the dst format, then
571 * If the dst format is Luminance, we need to do the conversion by computing
586 if (format == GL_LUMINANCE_ALPHA)
596 luminance, format, transferOps);
601 luminance_format = _mesa_format_from_format_and_type(format, GL_FLOAT);
608 dst, format, type);
616 _mesa_swap_bytes_2d_image(format, type, packing,
643 if (rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM &&
644 rb->Format != MESA_FORMAT_Z24_UNORM_S8_UINT)
655 _mesa_unpack_uint_24_8_depth_stencil_row(rb->Format, width,
684 if (_mesa_get_format_datatype(depthRb->Format) != GL_UNSIGNED_NORMALIZED)
706 _mesa_unpack_uint_z_row(depthRb->Format, width, depthMap, dst);
707 _mesa_unpack_ubyte_stencil_row(stencilRb->Format, width,
778 _mesa_unpack_float_z_row(depthRb->Format, width, depthMap, depthVals);
779 _mesa_unpack_ubyte_stencil_row(stencilRb->Format, width,
856 GLenum format, GLenum type,
867 if (readpixels_memcpy(ctx, x, y, width, height, format, type,
874 switch (format) {
889 read_rgba_pixels(ctx, x, y, width, height, format, type, pixels,
899 read_pixels_es3_error_check(GLenum format, GLenum type,
903 const GLenum data_type = _mesa_get_format_datatype(rb->Format);
914 switch (format) {
984 GLenum format, GLenum type, GLsizei bufSize,
999 _mesa_enum_to_string(format),
1018 rb = _mesa_get_read_renderbuffer_for_format(ctx, format);
1026 * combinations of format and type that can be used.
1035 _mesa_is_color_format(format) &&
1036 _mesa_get_color_read_format(ctx) == format &&
1040 err = _mesa_es_error_check_format_and_type(ctx, format, type, 2);
1047 err = read_pixels_es3_error_check(format, type, rb);
1051 _mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
1052 _mesa_enum_to_string(format),
1058 err = _mesa_error_check_format_and_type(ctx, format, type);
1060 _mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
1061 _mesa_enum_to_string(format),
1072 if (!_mesa_source_buffer_exists(ctx, format)) {
1077 /* Check that the destination format and source buffer are both
1080 if (ctx->Extensions.EXT_texture_integer && _mesa_is_color_format(format)) {
1082 const GLboolean srcInteger = _mesa_is_format_integer_color(rb->Format);
1083 const GLboolean dstInteger = _mesa_is_enum_format_integer(format);
1086 "glReadPixels(integer / non-integer format mismatch");
1097 format, type, bufSize, pixels)) {
1117 format, type, &clippedPacking, pixels);
1122 GLenum format, GLenum type, GLvoid *pixels )
1124 _mesa_ReadnPixelsARB(x, y, width, height, format, type, INT_MAX, pixels);