Search Issue Tracker

Third Party Issue

Votes

0

Found in

2021.3.45f1

2022.3.52f1

6000.0.26f1

6000.1.0a3

Issue ID

UUM-86995

Regression

No

Crash when trying to force Shader to interpret 1/30 as a floating point operation

-

Reproduction steps:
1. Open the attached “BugRepro” project
2. Wait for shaders to compile

Expected result: Shader compiles successfully
Actual result: Machine blacks out and crashes

Reproducible with: 2021.3.45f1, 2022.3.52f1, 6000.0.26f1, 6000.1.0a3

Reproducible on: Ubuntu 24.04, Windows 10, Arch (user)
Not reproducible on: No other environment tested

First lines of the stack trace:
{{#4 0x00755e4e755110 in amdgpu_winsys_create}}
{{#5 0x00755e4e757bf6 in amdgpu_winsys_create}}
{{#6 0x00755e4defcb81 in __driDriverGetExtensions_d3d12}}
{{#7 0x00755e4df1d6fc in __driDriverGetExtensions_d3d12}}

{{#4 0x007bf9e17b0083 in amdgpu_winsys_create}}
{{#5 0x007bf9e17b3573 in amdgpu_winsys_create}}
{{#6 0x007bf9e0eab854 in vdp_imp_device_create_x11}}
{{#7 0x007bf9e0ecec9d in vdp_imp_device_create_x11}}
{{#8 0x007bfa131e539d in pthread_condattr_setpshared}}

  1. Resolution Note:

    1/30 is rightfully interpreted as 0. Both constants are integers, and integer division of 1 by 30 gives a zero.

    The shader uses this constant after converting to float as a divisor:
    int sampleCount = (0.01111/float(1/30))*32;
    The floating point result of this operation is NaN, which is then converted to int. I'm pretty sure the driver doesn't like using this as a loop counter.

    In order to fix this, `1.0/30.0` should be used instead.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.