mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 15:00:57 +01:00
refactor(test): Rename zero_init_texture_after_discard -> zero_init
This commit is contained in:
1 parent
42ee962572
commit
54e741adbd
2 files changed
+8
-8
No files matched your search
@@ -81,7 +81,7 @@ mod vertex_formats;
|
||||
mod vertex_indices;
|
||||
mod vertex_state;
|
||||
mod write_texture;
|
||||
mod zero_init_texture_after_discard;
|
||||
mod zero_init;
|
||||
|
||||
fn all_tests() -> Vec<wgpu_test::GpuTestInitializer> {
|
||||
let mut tests = Vec::new();
|
||||
@@ -163,7 +163,7 @@ fn all_tests() -> Vec<wgpu_test::GpuTestInitializer> {
|
||||
vertex_indices::all_tests(&mut tests);
|
||||
vertex_state::all_tests(&mut tests);
|
||||
write_texture::all_tests(&mut tests);
|
||||
zero_init_texture_after_discard::all_tests(&mut tests);
|
||||
zero_init::all_tests(&mut tests);
|
||||
naga_capabilities::all_tests(&mut tests);
|
||||
|
||||
tests
|
||||
|
||||
+6
-6
@@ -19,7 +19,7 @@ static DISCARDING_COLOR_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_A
|
||||
GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(TestParameters::default().expect_fail(FailureCase::webgl2()))
|
||||
.run_async(|mut ctx| async move {
|
||||
let mut case = TestCase::new(&mut ctx, TextureFormat::Rgba8UnormSrgb);
|
||||
let mut case = DiscardTestCase::new(&mut ctx, TextureFormat::Rgba8UnormSrgb);
|
||||
case.create_command_encoder();
|
||||
case.discard();
|
||||
case.submit_command_encoder();
|
||||
@@ -36,7 +36,7 @@ static DISCARDING_COLOR_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_I
|
||||
GpuTestConfiguration = GpuTestConfiguration::new()
|
||||
.parameters(TestParameters::default().expect_fail(FailureCase::webgl2()))
|
||||
.run_async(|mut ctx| async move {
|
||||
let mut case = TestCase::new(&mut ctx, TextureFormat::Rgba8UnormSrgb);
|
||||
let mut case = DiscardTestCase::new(&mut ctx, TextureFormat::Rgba8UnormSrgb);
|
||||
case.create_command_encoder();
|
||||
case.discard();
|
||||
case.copy_texture_to_buffer();
|
||||
@@ -63,7 +63,7 @@ static DISCARDING_DEPTH_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_I
|
||||
TextureFormat::Depth24PlusStencil8,
|
||||
TextureFormat::Depth32Float,
|
||||
] {
|
||||
let mut case = TestCase::new(&mut ctx, format);
|
||||
let mut case = DiscardTestCase::new(&mut ctx, format);
|
||||
case.create_command_encoder();
|
||||
case.discard();
|
||||
case.copy_texture_to_buffer();
|
||||
@@ -92,7 +92,7 @@ static DISCARDING_EITHER_DEPTH_OR_STENCIL_ASPECT_TEST: GpuTestConfiguration =
|
||||
TextureFormat::Depth24PlusStencil8,
|
||||
TextureFormat::Depth32Float,
|
||||
] {
|
||||
let mut case = TestCase::new(&mut ctx, format);
|
||||
let mut case = DiscardTestCase::new(&mut ctx, format);
|
||||
case.create_command_encoder();
|
||||
case.discard_depth();
|
||||
case.submit_command_encoder();
|
||||
@@ -109,7 +109,7 @@ static DISCARDING_EITHER_DEPTH_OR_STENCIL_ASPECT_TEST: GpuTestConfiguration =
|
||||
}
|
||||
});
|
||||
|
||||
struct TestCase<'ctx> {
|
||||
struct DiscardTestCase<'ctx> {
|
||||
ctx: &'ctx mut TestingContext,
|
||||
format: TextureFormat,
|
||||
texture: Texture,
|
||||
@@ -117,7 +117,7 @@ struct TestCase<'ctx> {
|
||||
encoder: Option<CommandEncoder>,
|
||||
}
|
||||
|
||||
impl<'ctx> TestCase<'ctx> {
|
||||
impl<'ctx> DiscardTestCase<'ctx> {
|
||||
pub fn new(ctx: &'ctx mut TestingContext, format: TextureFormat) -> Self {
|
||||
let extra_usages = match format {
|
||||
TextureFormat::Depth24Plus | TextureFormat::Depth24PlusStencil8 => {
|
||||
Reference in new issue
Block a user