DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Remove redundant uav load/store caused by partial update or copyin/out

Open python3kgae opened this issue 4 years ago • 2 comments

For the repro, only u[i].b need to be load and store.

struct S {

float4x4 a[10]; float4 b; };

RWStructuredBuffer< S > u;

void foo(inout S s) {

s.b += sin(s.b);

}

float4 main(uint i:I) : SV_Target { foo(u[i]); return u[i].b; }

python3kgae avatar Jan 11 '22 21:01 python3kgae

:white_check_mark: Build DirectXShaderCompiler 1.0.1056 completed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/bbbfe35ec8 by @)

AppVeyorBot avatar Jan 11 '22 22:01 AppVeyorBot

:white_check_mark: Build DirectXShaderCompiler 1.0.1060 completed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/3aaf47c156 by @)

AppVeyorBot avatar Jan 12 '22 23:01 AppVeyorBot