Commit fcc64415 by Nicolas Capens Committed by Nicolas Capens

Refactor writing texture level descriptor info

This will make it easier to write YCbCr plane data as mipmap levels. Also removes the unused fWidth, fHeight, and fDepth from sw::Mipmap, and ensured the other members are aligned to their vector size. Bug: b/132437008 Tests: dEQP-VK.*ycbcr* Change-Id: Ib2b0cbebf9e4fd640fcc104281097ff3c4c73b5d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31616 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent ba873309
...@@ -31,13 +31,13 @@ namespace sw ...@@ -31,13 +31,13 @@ namespace sw
{ {
const void *buffer[6]; const void *buffer[6];
short uHalf[4]; short4 uHalf;
short vHalf[4]; short4 vHalf;
short wHalf[4]; short4 wHalf;
int4 width; int4 width;
int4 height; int4 height;
int4 depth; int4 depth;
short onePitchP[4]; short4 onePitchP;
int4 pitchP; int4 pitchP;
int4 sliceP; int4 sliceP;
}; };
......
...@@ -82,6 +82,7 @@ public: ...@@ -82,6 +82,7 @@ public:
static void CopyDescriptorSet(const VkCopyDescriptorSet& descriptorCopies); static void CopyDescriptorSet(const VkCopyDescriptorSet& descriptorCopies);
static void WriteDescriptorSet(DescriptorSet *dstSet, VkDescriptorUpdateTemplateEntry const &entry, char const *src); static void WriteDescriptorSet(DescriptorSet *dstSet, VkDescriptorUpdateTemplateEntry const &entry, char const *src);
static void WriteTextureLevelInfo(sw::Texture *texture, int level, int width, int height, int depth, int pitchP, int sliceP);
void initialize(VkDescriptorSet descriptorSet); void initialize(VkDescriptorSet descriptorSet);
......
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