Fix SamplerFilterAnisotropicTests mipmap

Fix a bug about mipmap level in SamplerFilterAnisotropicTests.
Sizes of the 3 miplevels should be 4,2,1.
The old code allocates 8,4,2 (which don't have a 1x1 level)
Expected rendered pixel values have to change.
The render result now fits the webgl demo at https://jsfiddle.net/t8k7c95o/5/
(Thanks Kai for the enlarged pixelated canvas)

ComputeBoids.cpp and DawnTest.cpp change is due to git cl format

Bug: dawn:568
Change-Id: I9069732208a16be285be13b8cd1ab19b211995a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37380
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
shrekshao
2021-01-12 23:56:54 +00:00
committed by Commit Bot service account
parent e6ca254c72
commit 7faa362ea9
3 changed files with 27 additions and 30 deletions

View File

@@ -95,8 +95,7 @@ void initBuffers() {
}
void initRender() {
wgpu::ShaderModule vsModule =
utils::CreateShaderModuleFromWGSL(device, R"(
wgpu::ShaderModule vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[location(0)]] var<in> a_particlePos : vec2<f32>;
[[location(1)]] var<in> a_particleVel : vec2<f32>;
[[location(2)]] var<in> a_pos : vec2<f32>;
@@ -113,8 +112,7 @@ void initRender() {
}
)");
wgpu::ShaderModule fsModule =
utils::CreateShaderModuleFromWGSL(device, R"(
wgpu::ShaderModule fsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[location(0)]] var<out> FragColor : vec4<f32>;
[[stage(fragment)]]
fn main() -> void {