Lines Matching defs:format

33 #include "util/format/u_format.h"
34 #include "util/format/u_format_s3tc.h"
45 * This function returns the format that must be used to program CB and TX
48 static enum pipe_format r300_unbyteswap_array_format(enum pipe_format format)
53 return format;
57 switch (format) {
67 return format;
71 static unsigned r300_get_endian_swap(enum pipe_format format)
76 if (r300_unbyteswap_array_format(format) != format)
82 desc = util_format_description(format);
84 /* Compressed formats should be in the little endian format. */
153 /* Translate a pipe_format into a useful texture format for sampling.
165 uint32_t r300_translate_texformat(enum pipe_format format,
181 format = r300_unbyteswap_array_format(format);
182 desc = util_format_description(format);
189 switch (format) {
206 switch (format) {
221 switch (format) {
233 if (util_format_is_compressed(format) &&
235 format != PIPE_FORMAT_RGTC2_UNORM &&
236 format != PIPE_FORMAT_RGTC2_SNORM &&
237 format != PIPE_FORMAT_LATC2_UNORM &&
238 format != PIPE_FORMAT_LATC2_SNORM &&
239 format != PIPE_FORMAT_RGTC1_UNORM &&
240 format != PIPE_FORMAT_RGTC1_SNORM &&
241 format != PIPE_FORMAT_LATC1_UNORM &&
242 format != PIPE_FORMAT_LATC1_SNORM) {
252 switch (format) {
271 switch (format) {
293 /* This is truly a special format.
296 if (format == PIPE_FORMAT_R8G8Bx_SNORM) {
441 uint32_t r500_tx_format_msb_bit(enum pipe_format format)
443 switch (format) {
458 /* Colorbuffer formats. This is the unswizzled format of the RB3D block's
459 * output. For the swizzling of the targets, check the shader's format. */
460 static uint32_t r300_translate_colorformat(enum pipe_format format)
462 format = r300_unbyteswap_array_format(format);
464 switch (format) {
571 static uint32_t r300_translate_zsformat(enum pipe_format format)
573 switch (format) {
591 static uint32_t r300_translate_out_fmt(enum pipe_format format)
598 format = r300_unbyteswap_array_format(format);
599 desc = util_format_description(format);
683 switch (format) {
793 static uint32_t r300_translate_colormask_swizzle(enum pipe_format format)
795 format = r300_unbyteswap_array_format(format);
797 switch (format) {
887 boolean r300_is_colorbuffer_format_supported(enum pipe_format format)
889 return r300_translate_colorformat(format) != ~0 &&
890 r300_translate_out_fmt(format) != ~0 &&
891 r300_translate_colormask_swizzle(format) != ~0;
894 boolean r300_is_zs_format_supported(enum pipe_format format)
896 return r300_translate_zsformat(format) != ~0;
899 boolean r300_is_sampler_format_supported(enum pipe_format format)
901 return r300_translate_texformat(format, NULL, TRUE, FALSE) != ~0;
906 enum pipe_format format,
940 r300_stride_to_width(format, desc->stride_in_bytes[level]);
986 R300_TXO_ENDIAN(r300_get_endian_swap(format));
994 r300_stride_to_width(surf->base.format, tex->tex.stride_in_bytes[level]);
997 if (util_format_is_depth_or_stencil(surf->base.format)) {
1002 R300_DEPTHENDIAN(r300_get_endian_swap(surf->base.format));
1003 surf->format = r300_translate_zsformat(surf->base.format);
1007 enum pipe_format format = util_format_linear(surf->base.format);
1011 r300_translate_colorformat(format) |
1014 R300_COLOR_ENDIAN(r300_get_endian_swap(format));
1015 surf->format = r300_translate_out_fmt(format);
1017 r300_translate_colormask_swizzle(format);
1111 util_format_is_depth_or_stencil(base->format) ? "depth" : "color");
1175 if (util_format_is_depth_or_stencil(base->format) &&
1177 switch (util_format_get_blocksize(base->format)) {
1211 surface->base.format = surf_tmpl->format;
1234 tile_height = r300_get_pixel_alignment(surface->base.format,
1251 if (util_format_get_blocksizebits(surface->base.format) == 32)