Skip to content

Commit

Permalink
Add compute ResourceUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
knokko committed Oct 12, 2024
1 parent ad3a32f commit 153779d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 153779d

Please sign in to comment.