Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for ICE in the DXC shader compiler in debug builds with an EnvironmentMapLight #11487

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

Elabajaba
Copy link
Contributor

Objective

DXC+DX12 debug builds with an environment map have been broken since #11366 merged due to an internal compiler error in DXC. I tracked it down to a single break statement and reported it upstream (microsoft/DirectXShaderCompiler#6183)

Solution

Workaround the ICE by setting the for loop index variable to the max value of the loop to avoid the break that's causing the ICE.

This works because it's the last thing in the for loop.

The reflection_probes and pbr examples both appear to still work correctly.

@JMS55
Copy link
Contributor

JMS55 commented Jan 23, 2024

Can we leave a commented-out break; so it's clear what to do when this is fixed?

@Kanabenki Kanabenki added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Jan 23, 2024
@JMS55 JMS55 added this to the 0.13 milestone Jan 24, 2024
@JMS55 JMS55 requested a review from IceSentry January 26, 2024 20:23
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 27, 2024
@mockersf mockersf added this pull request to the merge queue Jan 27, 2024
Merged via the queue into bevyengine:main with commit 45e920c Jan 27, 2024
25 checks passed
tjamaan pushed a commit to tjamaan/bevy that referenced this pull request Feb 6, 2024
… `EnvironmentMapLight` (bevyengine#11487)

# Objective

DXC+DX12 debug builds with an environment map have been broken since
bevyengine#11366 merged due to an internal
compiler error in DXC. I tracked it down to a single `break` statement
and reported it upstream
(microsoft/DirectXShaderCompiler#6183)

## Solution

Workaround the ICE by setting the for loop index variable to the max
value of the loop to avoid the `break` that's causing the ICE.

This works because it's the last thing in the for loop.

The `reflection_probes` and `pbr` examples both appear to still work
correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants