mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Implement FXC workaround for vector access in loops resulting in failed loop unrolling
When indexing into vectors in a loop, FXC sometimes fails to determine the max number of iterations when attempting to unroll the loop, resulting in "error X3511: forced to unroll loop, but unrolling failed.". We work around this by calling a function that sets the input value at the input index into an inout vector. This seems to nudge FXC enough for it to determine the number of loop iterations to unroll. Bug: tint:534 Change-Id: I52cb209be29fcad8fbb91283c7be8c6e22e00656 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56140 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
53069b283d
commit
b293f51f83
@@ -20,9 +20,9 @@
|
||||
#include "src/utils/io/tmpfile.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <d3dcommon.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <wrl.h>
|
||||
using Microsoft::WRL::ComPtr;
|
||||
|
||||
Reference in New Issue
Block a user