mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 22:44:04 +00:00
writer/hlsl: Use unsigned indices for UBOs
These indices were a mix of signed and unsigned. Modulus on the signed integers was producing FXC warnings about performance. Change-Id: Ib82f4296199a09d2f03be8b06314feefce0022e2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56765 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -623,7 +623,7 @@ bool GeneratorImpl::EmitUniformBufferAccess(
|
||||
std::string scalar_offset = UniqueIdentifier("scalar_offset");
|
||||
{
|
||||
auto pre = line();
|
||||
pre << "const int " << scalar_offset << " = (";
|
||||
pre << "const uint " << scalar_offset << " = (";
|
||||
if (!EmitExpression(pre, params[1])) { // offset
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user