[XeSL] xesl_write*Store > xesl_*Store

This commit is contained in:
Triang3l
2022-06-24 23:37:29 +03:00
parent 7a4732e14f
commit f4a634c617
29 changed files with 89 additions and 95 deletions

View File

@@ -51,36 +51,36 @@ xesl_entry_inputs_end_code_begin_compute
xesl_uint4 blocks_23 = XeEndianSwap32(
xesl_typedStorageBufferLoad(xe_texture_load_source, block_offset_guest),
load_info.endian_32);
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_01.xz));
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host + 1u,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_23.xz));
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
block_offset_host += elements_pitch_host;
xesl_uint4 high_halfblocks = xesl_uint4(blocks_01.xz, blocks_23.xz) >> 16u;
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.xy));
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host + 1u,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.zw));
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
block_offset_host += elements_pitch_host;
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_01.yw));
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host + 1u,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(blocks_23.yw));
xesl_dont_flatten if (++texel_index_host.y < load_info.height_texels) {
block_offset_host += elements_pitch_host;
high_halfblocks = xesl_uint4(blocks_01.yw, blocks_23.yw) >> 16u;
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.xy));
xesl_writeTypedStorageBufferStore(
xesl_typedStorageBufferStore(
xe_texture_load_dest, block_offset_host + 1u,
XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP(high_halfblocks.zw));
}