From e97ac96a1ce3f511daaabd60a32cbcb243697b96 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:37:22 +0100 Subject: [PATCH] revert changes to `zero_init_texture_after_discard` --- .../tests/zero_init_texture_after_discard.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/tests/zero_init_texture_after_discard.rs b/tests/tests/zero_init_texture_after_discard.rs index 598ba14fb3..96dac225fd 100644 --- a/tests/tests/zero_init_texture_after_discard.rs +++ b/tests/tests/zero_init_texture_after_discard.rs @@ -13,8 +13,11 @@ static DISCARDING_COLOR_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_A let mut case = TestCase::new(&mut ctx, TextureFormat::Rgba8UnormSrgb); case.create_command_encoder(); case.discard(); + case.submit_command_encoder(); + + case.create_command_encoder(); case.copy_texture_to_buffer(); - case.submit_command_encoder_and_wait(); + case.submit_command_encoder(); case.assert_buffers_are_zero(); }); @@ -28,7 +31,7 @@ static DISCARDING_COLOR_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_I case.create_command_encoder(); case.discard(); case.copy_texture_to_buffer(); - case.submit_command_encoder_and_wait(); + case.submit_command_encoder(); case.assert_buffers_are_zero(); }); @@ -55,7 +58,7 @@ static DISCARDING_DEPTH_TARGET_RESETS_TEXTURE_INIT_STATE_CHECK_VISIBLE_ON_COPY_I case.create_command_encoder(); case.discard(); case.copy_texture_to_buffer(); - case.submit_command_encoder_and_wait(); + case.submit_command_encoder(); case.assert_buffers_are_zero(); } @@ -85,9 +88,15 @@ static DISCARDING_EITHER_DEPTH_OR_STENCIL_ASPECT_TEST: GpuTestConfiguration = let mut case = TestCase::new(&mut ctx, format); case.create_command_encoder(); case.discard_depth(); + case.submit_command_encoder(); + + case.create_command_encoder(); case.discard_stencil(); + case.submit_command_encoder(); + + case.create_command_encoder(); case.copy_texture_to_buffer(); - case.submit_command_encoder_and_wait(); + case.submit_command_encoder(); case.assert_buffers_are_zero(); } @@ -205,11 +214,10 @@ impl<'ctx> TestCase<'ctx> { ) } - pub fn submit_command_encoder_and_wait(&mut self) { + pub fn submit_command_encoder(&mut self) { self.ctx .queue .submit([self.encoder.take().unwrap().finish()]); - self.ctx.device.poll(MaintainBase::Wait); } pub fn discard(&mut self) {