diff --git a/src/main/java/com/github/knokko/boiler/synchronization/ResourceUsage.java b/src/main/java/com/github/knokko/boiler/synchronization/ResourceUsage.java index dd00b06..3a430d0 100644 --- a/src/main/java/com/github/knokko/boiler/synchronization/ResourceUsage.java +++ b/src/main/java/com/github/knokko/boiler/synchronization/ResourceUsage.java @@ -41,6 +41,14 @@ public static ResourceUsage shaderRead(int stageMask) { return new ResourceUsage(VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_ACCESS_SHADER_READ_BIT, stageMask); } + public static ResourceUsage compute(int imageLayout, int accessMask) { + return new ResourceUsage(imageLayout, accessMask, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT); + } + + public static ResourceUsage computeBuffer(int accessMask) { + return compute(0, accessMask); + } + public static ResourceUsage fromPresent(int stageMask) { return new ResourceUsage(VK_IMAGE_LAYOUT_UNDEFINED, 0, stageMask); }