Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void convert_dxt1_b8g8r8a8_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch,
- UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth);
- static void convert_dxt3_b8g8r8a8_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch,
- UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth);
- static void convert_dxt5_b8g8r8a8_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch,
- UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth);
- struct wined3d_format_decompress_info
- {
- enum wined3d_format_id id;
- DWORD flags;
- void (*decompress)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch,
- unsigned int dst_row_pitch, unsigned int dst_slice_pitch,
- unsigned int width, unsigned int height, unsigned int depth);
- };
- static const struct wined3d_format_decompress_info format_decompress_info[] =
- {
- {WINED3DFMT_DXT1, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt1_b8g8r8a8_unorm},
- {WINED3DFMT_DXT2, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt3_b8g8r8a8_unorm},
- {WINED3DFMT_DXT3, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt3_b8g8r8a8_unorm},
- {WINED3DFMT_DXT4, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt5_b8g8r8a8_unorm},
- {WINED3DFMT_DXT5, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt5_b8g8r8a8_unorm},
- {WINED3DFMT_BC1_UNORM, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt1_b8g8r8a8_unorm},
- {WINED3DFMT_BC2_UNORM, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt3_b8g8r8a8_unorm},
- {WINED3DFMT_BC3_UNORM, WINED3DFMT_FLAG_DECOMPRESS, convert_dxt5_b8g8r8a8_unorm},
- };
- ---This part is in function init_format_base_info(struct wined3d_gl_info *gl_info)
- for (i = 0; i < ARRAY_SIZE(format_decompress_info); ++i)
- {
- if (!(format = get_format_internal(gl_info, format_decompress_info[i].id)))
- goto fail;
- format->flags[WINED3D_GL_RES_TYPE_TEX_3D] |= format_decompress_info[i].flags;
- format->decompress = format_decompress_info[i].decompress;
- if (format->decompress)
- FIXME("format->decompress is fine here.\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement