]> git.nega.tv - josh/narcissus/commitdiff
shark: Use compute barriers for UI images
authorJosh Simmons <josh@nega.tv>
Tue, 18 Jun 2024 20:47:21 +0000 (22:47 +0200)
committerJosh Simmons <josh@nega.tv>
Tue, 18 Jun 2024 20:47:21 +0000 (22:47 +0200)
We access these exclusively from compute stages now, rather than via a
graphics pass, so we should use the compute only access types.

title/shark/src/main.rs

index 2830aa247fb1172a3cf74baccd42b0a5fd7edfcc..3f83795d8b7c86681ffa8bcb6c9d70e72fe44f65 100644 (file)
@@ -1220,7 +1220,7 @@ impl<'gpu> DrawState<'gpu> {
                     None,
                     &[ImageBarrier::layout_optimal(
                         &[Access::TransferWrite],
-                        &[Access::FragmentShaderSampledImageRead],
+                        &[Access::ShaderSampledImageRead],
                         self.glyph_atlas_image,
                         ImageAspectFlags::COLOR,
                     )],
@@ -1241,7 +1241,7 @@ impl<'gpu> DrawState<'gpu> {
                     ),
                     ImageBarrier {
                         prev_access: &[Access::None],
-                        next_access: &[Access::ShaderWrite],
+                        next_access: &[Access::ComputeWrite],
                         prev_layout: ImageLayout::Optimal,
                         next_layout: ImageLayout::General,
                         image: self.ui_image,
@@ -1543,9 +1543,9 @@ impl<'gpu> DrawState<'gpu> {
                             subresource_range: ImageSubresourceRange::default(),
                         },
                         ImageBarrier {
-                            prev_access: &[Access::ShaderWrite],
+                            prev_access: &[Access::ComputeWrite],
                             prev_layout: ImageLayout::General,
-                            next_access: &[Access::ShaderOtherRead],
+                            next_access: &[Access::ComputeOtherRead],
                             next_layout: ImageLayout::General,
                             image: self.ui_image,
                             subresource_range: ImageSubresourceRange::default(),