GPUOpen-Tools / radeon_gpu_analyzer

The Radeon GPU Analyzer (RGA) is an offline compiler and code analysis tool for Vulkan, DirectX, OpenGL, and OpenCL.
MIT License
405 stars 53 forks source link

Strange ISA dump results in offline dx11 mode #102

Open aras-p opened 1 year ago

aras-p commented 1 year ago

I'm trying to optimize some DX11 shader bits on a machine that does not have AMD GPU nor a driver installed. Getting really strange results, as if a bunch of shader code is not really used at all. I can reproduce that even with tiny shaders, using currently latest (2.7) RGA:

// test.hlsl
float4 vs(float4 pos : POSITION) : SV_POSITION
{
    return sqrt(pos);
}

and a command line like: rga-windows-x64-2.7\rga.exe -s dx11 -p vs_5_0 -f vs -c gfx900 --isa out.txt test.hlsl produces these relevant bits in the output:

  v_mov_b32     v0, 0
  v_mov_b32     v1, 1.0
  exp           pos0, v0, v0, v0, v1 done

It's as if a shader is actually outputting (0,0,0,1). The same happens with other -c arguments, e.g. gfx1100 or gfx1030.

AmitBM commented 1 year ago

Hi @aras-p,

Thanks for reporting this issue - we will look into this.

AmitBM commented 1 year ago

Hi @aras-p,

We updated the RGA 2.7 Windows release archive with a fix and updated the release notes accordingly. Please note that gfx1100 is not yet supported as a target in DX11 mode - this will be addressed in a future release.