mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
mesa: Move the FXT1 compressor/decompressor to util/
softpipe failed at handling FXT1, despite exposing it, because we didn't have a fetch function for it in the util/ format table. Fixes: #3968 Reviewed-by: Adam jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9194>
This commit is contained in:
parent
db0c2ef979
commit
a46b73ee25
9 changed files with 1834 additions and 1571 deletions
|
|
@ -210,7 +210,6 @@ spec/!opengl 1.1/teximage-colors gl_rgb9_e5/exact upload-download of gl_rgb9_e5:
|
||||||
spec/!opengl 1.1/teximage-colors gl_rgb/exact upload-download of gl_rgb: skip
|
spec/!opengl 1.1/teximage-colors gl_rgb/exact upload-download of gl_rgb: skip
|
||||||
spec/!opengl 1.1/teximage-colors gl_rgba12/exact upload-download of gl_rgba12: skip
|
spec/!opengl 1.1/teximage-colors gl_rgba12/exact upload-download of gl_rgba12: skip
|
||||||
spec/!opengl 1.1/teximage-colors gl_rgba/exact upload-download of gl_rgba: skip
|
spec/!opengl 1.1/teximage-colors gl_rgba/exact upload-download of gl_rgba: skip
|
||||||
spec/!opengl 1.1/texsubimage: crash
|
|
||||||
spec/!opengl 1.1/texwrap 2d offset/gl_rgba8, npot: fail
|
spec/!opengl 1.1/texwrap 2d offset/gl_rgba8, npot: fail
|
||||||
spec/!opengl 1.1/texwrap 2d proj/gl_rgba8, npot, projected: fail
|
spec/!opengl 1.1/texwrap 2d proj/gl_rgba8, npot, projected: fail
|
||||||
spec/!opengl 1.1/texwrap 2d proj/gl_rgba8, projected: fail
|
spec/!opengl 1.1/texwrap 2d proj/gl_rgba8, projected: fail
|
||||||
|
|
@ -398,10 +397,6 @@ spec/!opengl 4.5/named-framebuffer-read-buffer-errors: skip
|
||||||
spec/!opengl es 2.0/invalid-es3-queries_gles2: skip
|
spec/!opengl es 2.0/invalid-es3-queries_gles2: skip
|
||||||
spec/!opengl es 3.0/gles-3.0-transform-feedback-uniform-buffer-object: fail
|
spec/!opengl es 3.0/gles-3.0-transform-feedback-uniform-buffer-object: fail
|
||||||
spec/!opengl es 3.0/minmax: fail
|
spec/!opengl es 3.0/minmax: fail
|
||||||
spec/3dfx_texture_compression_fxt1/compressedteximage gl_compressed_rgb_fxt1_3dfx: crash
|
|
||||||
spec/3dfx_texture_compression_fxt1/compressedteximage gl_compressed_rgba_fxt1_3dfx: crash
|
|
||||||
spec/3dfx_texture_compression_fxt1/fbo-generatemipmap-formats: crash
|
|
||||||
spec/3dfx_texture_compression_fxt1/fxt1-teximage: crash
|
|
||||||
spec/amd_compressed_atc_texture/miptree: skip
|
spec/amd_compressed_atc_texture/miptree: skip
|
||||||
spec/amd_depth_clamp_separate/amd_depth_clamp_separate_range: skip
|
spec/amd_depth_clamp_separate/amd_depth_clamp_separate_range: skip
|
||||||
spec/amd_depth_clamp_separate/amd_depth_clamp_separate_status: skip
|
spec/amd_depth_clamp_separate/amd_depth_clamp_separate_status: skip
|
||||||
|
|
@ -597,7 +592,6 @@ spec/arb_depth_texture/texwrap formats/gl_depth_component24, npot: fail
|
||||||
spec/arb_depth_texture/texwrap formats/gl_depth_component32, npot: fail
|
spec/arb_depth_texture/texwrap formats/gl_depth_component32, npot: fail
|
||||||
spec/arb_direct_state_access/create-programpipelines/default tcs == 0: skip
|
spec/arb_direct_state_access/create-programpipelines/default tcs == 0: skip
|
||||||
spec/arb_direct_state_access/create-programpipelines/default tes == 0: skip
|
spec/arb_direct_state_access/create-programpipelines/default tes == 0: skip
|
||||||
spec/arb_direct_state_access/getcompressedtextureimage: crash
|
|
||||||
spec/arb_direct_state_access/gettextureimage-formats: crash
|
spec/arb_direct_state_access/gettextureimage-formats: crash
|
||||||
spec/arb_direct_state_access/texture-buffer: fail
|
spec/arb_direct_state_access/texture-buffer: fail
|
||||||
spec/arb_enhanced_layouts/arb_enhanced_layouts-transform-feedback-layout-qualifiers_gs: crash
|
spec/arb_enhanced_layouts/arb_enhanced_layouts-transform-feedback-layout-qualifiers_gs: crash
|
||||||
|
|
@ -760,7 +754,6 @@ spec/arb_internalformat_query/minmax: skip
|
||||||
spec/arb_internalformat_query/misc. api error checks: skip
|
spec/arb_internalformat_query/misc. api error checks: skip
|
||||||
spec/arb_occlusion_query/occlusion_query_meta_no_fragments: fail
|
spec/arb_occlusion_query/occlusion_query_meta_no_fragments: fail
|
||||||
spec/arb_occlusion_query/occlusion_query_meta_save: fail
|
spec/arb_occlusion_query/occlusion_query_meta_save: fail
|
||||||
spec/arb_pixel_buffer_object/texsubimage pbo: crash
|
|
||||||
spec/arb_post_depth_coverage/arb_post_depth_coverage-basic: skip
|
spec/arb_post_depth_coverage/arb_post_depth_coverage-basic: skip
|
||||||
spec/arb_post_depth_coverage/arb_post_depth_coverage-multisampling: skip
|
spec/arb_post_depth_coverage/arb_post_depth_coverage-multisampling: skip
|
||||||
spec/arb_post_depth_coverage/arb_post_depth_coverage-sample-shading: skip
|
spec/arb_post_depth_coverage/arb_post_depth_coverage-sample-shading: skip
|
||||||
|
|
@ -3065,9 +3058,9 @@ wgl/wgl-sanity: skip
|
||||||
summary:
|
summary:
|
||||||
name: results
|
name: results
|
||||||
---- --------
|
---- --------
|
||||||
pass: 26855
|
pass: 26873
|
||||||
fail: 404
|
fail: 404
|
||||||
crash: 38
|
crash: 31
|
||||||
skip: 2593
|
skip: 2593
|
||||||
timeout: 0
|
timeout: 0
|
||||||
warn: 4
|
warn: 4
|
||||||
|
|
@ -3077,4 +3070,4 @@ summary:
|
||||||
changes: 0
|
changes: 0
|
||||||
fixes: 0
|
fixes: 0
|
||||||
regressions: 0
|
regressions: 0
|
||||||
total: 29919
|
total: 29930
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -30,10 +30,7 @@
|
||||||
|
|
||||||
|
|
||||||
extern GLboolean
|
extern GLboolean
|
||||||
_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS);
|
_mesa_texstore_fxt1(TEXSTORE_PARAMS);
|
||||||
|
|
||||||
extern GLboolean
|
|
||||||
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
|
|
||||||
|
|
||||||
|
|
||||||
compressed_fetch_func
|
compressed_fetch_func
|
||||||
|
|
|
||||||
|
|
@ -621,8 +621,8 @@ texstore_compressed(TEXSTORE_PARAMS)
|
||||||
table[MESA_FORMAT_SRGBA_DXT1] = _mesa_texstore_rgba_dxt1;
|
table[MESA_FORMAT_SRGBA_DXT1] = _mesa_texstore_rgba_dxt1;
|
||||||
table[MESA_FORMAT_SRGBA_DXT3] = _mesa_texstore_rgba_dxt3;
|
table[MESA_FORMAT_SRGBA_DXT3] = _mesa_texstore_rgba_dxt3;
|
||||||
table[MESA_FORMAT_SRGBA_DXT5] = _mesa_texstore_rgba_dxt5;
|
table[MESA_FORMAT_SRGBA_DXT5] = _mesa_texstore_rgba_dxt5;
|
||||||
table[MESA_FORMAT_RGB_FXT1] = _mesa_texstore_rgb_fxt1;
|
table[MESA_FORMAT_RGB_FXT1] = _mesa_texstore_fxt1;
|
||||||
table[MESA_FORMAT_RGBA_FXT1] = _mesa_texstore_rgba_fxt1;
|
table[MESA_FORMAT_RGBA_FXT1] = _mesa_texstore_fxt1;
|
||||||
table[MESA_FORMAT_RGB_DXT1] = _mesa_texstore_rgb_dxt1;
|
table[MESA_FORMAT_RGB_DXT1] = _mesa_texstore_rgb_dxt1;
|
||||||
table[MESA_FORMAT_RGBA_DXT1] = _mesa_texstore_rgba_dxt1;
|
table[MESA_FORMAT_RGBA_DXT1] = _mesa_texstore_rgba_dxt1;
|
||||||
table[MESA_FORMAT_RGBA_DXT3] = _mesa_texstore_rgba_dxt3;
|
table[MESA_FORMAT_RGBA_DXT3] = _mesa_texstore_rgba_dxt3;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ MESA_UTIL_FILES := \
|
||||||
format/u_format_bptc.h \
|
format/u_format_bptc.h \
|
||||||
format/u_format_etc.c \
|
format/u_format_etc.c \
|
||||||
format/u_format_etc.h \
|
format/u_format_etc.h \
|
||||||
|
format/u_format_fxt1.c \
|
||||||
|
format/u_format_fxt1.h \
|
||||||
format/u_format_latc.c \
|
format/u_format_latc.c \
|
||||||
format/u_format_latc.h \
|
format/u_format_latc.h \
|
||||||
format/u_format_other.c \
|
format/u_format_other.c \
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ files_mesa_format = [
|
||||||
'u_format.c',
|
'u_format.c',
|
||||||
'u_format_bptc.c',
|
'u_format_bptc.c',
|
||||||
'u_format_etc.c',
|
'u_format_etc.c',
|
||||||
|
'u_format_fxt1.c',
|
||||||
'u_format_latc.c',
|
'u_format_latc.c',
|
||||||
'u_format_other.c',
|
'u_format_other.c',
|
||||||
'u_format_rgtc.c',
|
'u_format_rgtc.c',
|
||||||
|
|
|
||||||
1729
src/util/format/u_format_fxt1.c
Normal file
1729
src/util/format/u_format_fxt1.c
Normal file
File diff suppressed because it is too large
Load diff
79
src/util/format/u_format_fxt1.h
Normal file
79
src/util/format/u_format_fxt1.h
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
/**************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2010 VMware, Inc.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the
|
||||||
|
* "Software"), to deal in the Software without restriction, including
|
||||||
|
* without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
* distribute, sub license, and/or sell copies of the Software, and to
|
||||||
|
* permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||||
|
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice (including the
|
||||||
|
* next paragraph) shall be included in all copies or substantial portions
|
||||||
|
* of the Software.
|
||||||
|
*
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef U_FORMAT_FXT1_H_
|
||||||
|
#define U_FORMAT_FXT1_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "pipe/p_compiler.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgb_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||||
|
|
||||||
|
void
|
||||||
|
util_format_fxt1_rgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* U_FORMAT_FXT1_H_ */
|
||||||
|
|
@ -108,7 +108,7 @@ def has_access(format):
|
||||||
]
|
]
|
||||||
if format.short_name() in noaccess_formats:
|
if format.short_name() in noaccess_formats:
|
||||||
return False
|
return False
|
||||||
if format.layout in ('astc', 'atc', 'fxt1'):
|
if format.layout in ('astc', 'atc'):
|
||||||
return False
|
return False
|
||||||
if format.layout == 'etc' and format.short_name() != 'etc1_rgb8':
|
if format.layout == 'etc' and format.short_name() != 'etc1_rgb8':
|
||||||
return False
|
return False
|
||||||
|
|
@ -125,6 +125,7 @@ def write_format_table_header(file):
|
||||||
def write_format_table(formats):
|
def write_format_table(formats):
|
||||||
write_format_table_header(sys.stdout)
|
write_format_table_header(sys.stdout)
|
||||||
print('#include "u_format_bptc.h"')
|
print('#include "u_format_bptc.h"')
|
||||||
|
print('#include "u_format_fxt1.h"')
|
||||||
print('#include "u_format_s3tc.h"')
|
print('#include "u_format_s3tc.h"')
|
||||||
print('#include "u_format_rgtc.h"')
|
print('#include "u_format_rgtc.h"')
|
||||||
print('#include "u_format_latc.h"')
|
print('#include "u_format_latc.h"')
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue