Fix another -Wc++11-narrowing on ChromeOS
Bug: chromium:1064305 Change-Id: Id2650dd3dd4f6ec0baf97ab1d061eb908739940e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19284 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
518c8e77ab
commit
871651d999
|
@ -786,12 +786,12 @@ namespace dawn_native { namespace vulkan {
|
||||||
WrapVulkanImage(secondDevice, &descriptor, fd, stride, modifier, {});
|
WrapVulkanImage(secondDevice, &descriptor, fd, stride, modifier, {});
|
||||||
|
|
||||||
// Draw a non-trivial picture
|
// Draw a non-trivial picture
|
||||||
int width = 640, height = 480, pixelSize = 4;
|
uint32_t width = 640, height = 480, pixelSize = 4;
|
||||||
uint32_t rowPitch = Align(width * pixelSize, kTextureRowPitchAlignment);
|
uint32_t rowPitch = Align(width * pixelSize, kTextureRowPitchAlignment);
|
||||||
uint32_t size = rowPitch * (height - 1) + width * pixelSize;
|
uint32_t size = rowPitch * (height - 1) + width * pixelSize;
|
||||||
unsigned char data[size];
|
unsigned char data[size];
|
||||||
for (int row = 0; row < height; row++) {
|
for (uint32_t row = 0; row < height; row++) {
|
||||||
for (int col = 0; col < width; col++) {
|
for (uint32_t col = 0; col < width; col++) {
|
||||||
float normRow = static_cast<float>(row) / height;
|
float normRow = static_cast<float>(row) / height;
|
||||||
float normCol = static_cast<float>(col) / width;
|
float normCol = static_cast<float>(col) / width;
|
||||||
float dist = sqrt(normRow * normRow + normCol * normCol) * 3;
|
float dist = sqrt(normRow * normRow + normCol * normCol) * 3;
|
||||||
|
|
Loading…
Reference in New Issue