Lines Matching refs:format
93 /* Translate a pipe_format into a useful texture format for sampling.
101 * R300_EASY_TX_FORMAT(B, G, R, A, FORMAT);
103 * The FORMAT specifies how the texture sampler will treat the texture, and
105 uint32_t r300_translate_texformat(enum pipe_format format,
121 desc = util_format_description(format);
128 switch (format) {
145 switch (format) {
160 switch (format) {
172 if (format != PIPE_FORMAT_RGTC1_SNORM &&
173 format != PIPE_FORMAT_LATC1_SNORM) {
174 if (util_format_is_compressed(format) &&
176 format != PIPE_FORMAT_RGTC2_UNORM &&
177 format != PIPE_FORMAT_RGTC2_SNORM &&
178 format != PIPE_FORMAT_LATC2_UNORM &&
179 format != PIPE_FORMAT_LATC2_SNORM) {
194 switch (format) {
213 switch (format) {
232 /* This is truly a special format.
235 if (format == PIPE_FORMAT_R8G8Bx_SNORM) {
380 uint32_t r500_tx_format_msb_bit(enum pipe_format format)
382 switch (format) {
397 /* Colorbuffer formats. This is the unswizzled format of the RB3D block's
398 * output. For the swizzling of the targets, check the shader's format. */
399 static uint32_t r300_translate_colorformat(enum pipe_format format)
401 switch (format) {
497 static uint32_t r300_translate_zsformat(enum pipe_format format)
499 switch (format) {
517 static uint32_t r300_translate_out_fmt(enum pipe_format format)
524 desc = util_format_description(format);
608 switch (format) {
707 static uint32_t r300_translate_colormask_swizzle(enum pipe_format format)
709 switch (format) {
783 boolean r300_is_colorbuffer_format_supported(enum pipe_format format)
785 return r300_translate_colorformat(format) != ~0 &&
786 r300_translate_out_fmt(format) != ~0 &&
787 r300_translate_colormask_swizzle(format) != ~0;
790 boolean r300_is_zs_format_supported(enum pipe_format format)
792 return r300_translate_zsformat(format) != ~0;
795 boolean r300_is_sampler_format_supported(enum pipe_format format)
797 return r300_translate_texformat(format, 0, TRUE, FALSE) != ~0;
802 enum pipe_format format,
836 r300_stride_to_width(format, desc->stride_in_bytes[level]);
889 r300_stride_to_width(surf->base.format, tex->tex.stride_in_bytes[level]);
892 if (util_format_is_depth_or_stencil(surf->base.format)) {
897 surf->format = r300_translate_zsformat(surf->base.format);
903 r300_translate_colorformat(surf->base.format) |
906 surf->format = r300_translate_out_fmt(surf->base.format);
908 r300_translate_colormask_swizzle(surf->base.format);
1052 if (util_format_is_depth_or_stencil(base->format) &&
1054 switch (util_format_get_blocksize(base->format)) {
1090 surface->base.format = surf_tmpl->format;
1115 tile_height = r300_get_pixel_alignment(surface->base.format,
1132 if (util_format_get_blocksizebits(surface->base.format) == 32)