GPUOpen-Drivers / llpc

LLVM-Based Pipeline Compiler
MIT License
166 stars 115 forks source link

Fix the execution hangs due to the infinite loop when handling BuiltI… #2794

Closed ruiminzhao closed 11 months ago

ruiminzhao commented 11 months ago

…nSampleMask in patchFsBuiltInInputImport()

There is a concer case in a application scenario:

  1. RasterizerState.pixelShaderSamples is 0 because it was initialized in GraphicsPipeline::Create() with “GraphicsPipelineBinaryCreateInfo binaryCreateInfo = {};” and not modified after in this case.
  2. When it is 0, “baseMaskSamples *= 2” doesn’t change its value so it is stuck in the while loop forever
amdvlk-admin commented 11 months ago

Test summary for commit 9cf97a74576beefd52e4d9cc2a25b0e27fa725b6

CTS tests (Failed: 0/137941)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35352/68939 (51.3%)
    • Failed: 0/68939 (0.0%)
    • Not Supported: 33587/68939 (48.7%)
    • Warnings: 0/68939 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35424/69002 (51.3%)
    • Failed: 0/69002 (0.0%)
    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)
amdvlk-admin commented 11 months ago

Test summary for commit 27f8e38f9cfb599c1a9a38eb0dda4c536cf0168b

CTS tests (Failed: 0/138020)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35401/69018 (51.3%)
    • Failed: 0/69018 (0.0%)
    • Not Supported: 33617/69018 (48.7%)
    • Warnings: 0/69018 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35424/69002 (51.3%)
    • Failed: 0/69002 (0.0%)
    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)
nhaehnle commented 11 months ago

Thanks. Why is skipping the sample coverage masking really the right thing to do in this case? If the PS ends up running at sample rate, wouldn't it make sense to apply the masking with pixelShaderRate == 1?

ruiminzhao commented 11 months ago

Thanks. Why is skipping the sample coverage masking really the right thing to do in this case? If the PS ends up running at sample rate, wouldn't it make sense to apply the masking with pixelShaderRate == 1?

Oh....my mistake here. Now I have updated the code. Thanks for your correction!

amdvlk-admin commented 11 months ago

Test summary for commit 1104f712b53656fa80d7f9f69e9002f368f64f52

CTS tests (Failed: 0/137941)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35353/68939 (51.3%)
    • Failed: 0/68939 (0.0%)
    • Not Supported: 33586/68939 (48.7%)
    • Warnings: 0/68939 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35424/69002 (51.3%)
    • Failed: 0/69002 (0.0%)
    • Not Supported: 33578/69002 (48.7%)
    • Warnings: 0/69002 (0.0%)