Commit 4c6903a4 by Charlie Lao Committed by Commit Bot

Vulkan: Expand PackedAttachmentOpsDesc from uint16_t to two uint16_ts

This is preparation for crrev.com/c/2462604. We run out of bits in the struct PackedAttachmentOpsDesc. This expands it from 16 bits to 32 bits (two uint16_t), gives us a lot more room for current and future needs. Bug: angleproject:5055 Change-Id: I492cbd18c3b71b76b5b48652094409e76c5721b1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2465615Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
parent 4c6b4794
...@@ -288,7 +288,6 @@ struct PackedAttachmentOpsDesc final ...@@ -288,7 +288,6 @@ struct PackedAttachmentOpsDesc final
uint16_t storeOp : 1; uint16_t storeOp : 1;
uint16_t stencilLoadOp : 2; uint16_t stencilLoadOp : 2;
uint16_t stencilStoreOp : 1; uint16_t stencilStoreOp : 1;
// If a corresponding resolve attachment exists, storeOp may already be DONT_CARE, and it's // If a corresponding resolve attachment exists, storeOp may already be DONT_CARE, and it's
// unclear whether the attachment was invalidated or not. This information is passed along here // unclear whether the attachment was invalidated or not. This information is passed along here
// so that the resolve attachment's storeOp can be set to DONT_CARE if the attachment is // so that the resolve attachment's storeOp can be set to DONT_CARE if the attachment is
...@@ -297,14 +296,16 @@ struct PackedAttachmentOpsDesc final ...@@ -297,14 +296,16 @@ struct PackedAttachmentOpsDesc final
// render pass compatibility rules. // render pass compatibility rules.
uint16_t isInvalidated : 1; uint16_t isInvalidated : 1;
uint16_t isStencilInvalidated : 1; uint16_t isStencilInvalidated : 1;
uint16_t padding1 : 8;
// 4-bits to force pad the structure to exactly 2 bytes. Note that we currently don't support // 4-bits to force pad the structure to exactly 2 bytes. Note that we currently don't support
// any of the extension layouts, whose values start at 1'000'000'000. // any of the extension layouts, whose values start at 1'000'000'000.
uint16_t initialLayout : 4; uint16_t initialLayout : 4;
uint16_t finalLayout : 4; uint16_t finalLayout : 4;
uint16_t padding2 : 8;
}; };
static_assert(sizeof(PackedAttachmentOpsDesc) == 2, "Size check failed"); static_assert(sizeof(PackedAttachmentOpsDesc) == 4, "Size check failed");
class PackedAttachmentIndex; class PackedAttachmentIndex;
...@@ -345,7 +346,7 @@ class AttachmentOpsArray final ...@@ -345,7 +346,7 @@ class AttachmentOpsArray final
bool operator==(const AttachmentOpsArray &lhs, const AttachmentOpsArray &rhs); bool operator==(const AttachmentOpsArray &lhs, const AttachmentOpsArray &rhs);
static_assert(sizeof(AttachmentOpsArray) == 20, "Size check failed"); static_assert(sizeof(AttachmentOpsArray) == 40, "Size check failed");
struct PackedAttribDesc final struct PackedAttribDesc final
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment