mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 09:40:29 +01:00
i915g: Add support for FXT1.
This was the only GL extension supported by i915c and not i915g. Closes: #5229 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12367>
This commit is contained in:
parent
12b248755e
commit
d27a0dd7df
3 changed files with 8 additions and 9 deletions
|
|
@ -169,7 +169,7 @@ i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex)
|
|||
if (tex->b.target == PIPE_TEXTURE_1D)
|
||||
return I915_TILE_NONE;
|
||||
|
||||
if (util_format_is_s3tc(tex->b.format))
|
||||
if (util_format_is_compressed(tex->b.format))
|
||||
return I915_TILE_X;
|
||||
|
||||
if (is->debug.use_blitter)
|
||||
|
|
@ -366,7 +366,7 @@ i915_texture_layout_2d(struct i915_texture *tex)
|
|||
unsigned nblocksy = util_format_get_nblocksy(pt->format, width);
|
||||
unsigned align_y = 2;
|
||||
|
||||
if (util_format_is_s3tc(pt->format))
|
||||
if (util_format_is_compressed(pt->format))
|
||||
align_y = 1;
|
||||
|
||||
tex->stride = align(util_format_get_stride(pt->format, width), 4);
|
||||
|
|
@ -470,7 +470,7 @@ i945_texture_layout_2d(struct i915_texture *tex)
|
|||
unsigned nblocksx = util_format_get_nblocksx(pt->format, width);
|
||||
unsigned nblocksy = util_format_get_nblocksy(pt->format, height);
|
||||
|
||||
if (util_format_is_s3tc(pt->format)) {
|
||||
if (util_format_is_compressed(pt->format)) {
|
||||
align_x = 1;
|
||||
align_y = 1;
|
||||
}
|
||||
|
|
@ -648,7 +648,7 @@ i945_texture_layout_cube(struct i915_texture *tex)
|
|||
unsigned face;
|
||||
|
||||
assert(pt->width0 == pt->height0); /* cubemap images are square */
|
||||
assert(util_format_is_s3tc(pt->format)); /* compressed only */
|
||||
assert(util_format_is_compressed(pt->format)); /* compressed only */
|
||||
|
||||
/*
|
||||
* Depending on the size of the largest images, pitch can be
|
||||
|
|
@ -747,7 +747,7 @@ i945_texture_layout(struct i915_texture *tex)
|
|||
i945_texture_layout_3d(tex);
|
||||
break;
|
||||
case PIPE_TEXTURE_CUBE:
|
||||
if (!util_format_is_s3tc(tex->b.format))
|
||||
if (!util_format_is_compressed(tex->b.format))
|
||||
i9x5_texture_layout_cube(tex);
|
||||
else
|
||||
i945_texture_layout_cube(tex);
|
||||
|
|
|
|||
|
|
@ -450,6 +450,7 @@ i915_is_format_supported(struct pipe_screen *screen, enum pipe_format format,
|
|||
PIPE_FORMAT_DXT1_RGB, PIPE_FORMAT_DXT1_SRGB, PIPE_FORMAT_DXT1_RGBA,
|
||||
PIPE_FORMAT_DXT1_SRGBA, PIPE_FORMAT_DXT3_RGBA, PIPE_FORMAT_DXT3_SRGBA,
|
||||
PIPE_FORMAT_DXT5_RGBA, PIPE_FORMAT_DXT5_SRGBA, PIPE_FORMAT_Z24X8_UNORM,
|
||||
PIPE_FORMAT_FXT1_RGB, PIPE_FORMAT_FXT1_RGBA,
|
||||
PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_NONE /* list terminator */
|
||||
};
|
||||
static const enum pipe_format render_supported[] = {
|
||||
|
|
|
|||
|
|
@ -212,11 +212,9 @@ translate_texture_format(enum pipe_format pipeFormat,
|
|||
return (MAPSURF_422 | MT_422_YCRCB_NORMAL);
|
||||
case PIPE_FORMAT_UYVY:
|
||||
return (MAPSURF_422 | MT_422_YCRCB_SWAPY);
|
||||
#if 0
|
||||
case PIPE_FORMAT_RGB_FXT1:
|
||||
case PIPE_FORMAT_RGBA_FXT1:
|
||||
case PIPE_FORMAT_FXT1_RGB:
|
||||
case PIPE_FORMAT_FXT1_RGBA:
|
||||
return (MAPSURF_COMPRESSED | MT_COMPRESS_FXT1);
|
||||
#endif
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
return (MAPSURF_16BIT | MT_16BIT_L16);
|
||||
case PIPE_FORMAT_DXT1_RGB:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue