Commit a63cc59f by Jamie Madill Committed by Commit Bot

Vulkan: Don't store vertex attrib format and stride.

We only use these values in vertex conversion. We can instead pass more info to the convertGPU/CPU functions. In client attribute streaming we can query the format table a second time. This is a bit slower. But the runtime of attribute streaming would usually be dominated by the conversion function time. So it shouldn't regress any real work perf. This saves on a bit of storage and memory overhead in the vertex sync functions in VertexArrayVk. Bug: angleproject:3014 Change-Id: I401eeff024664aa0efeea710503c0f619e6d4f22 Reviewed-on: https://chromium-review.googlesource.com/c/1406889 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent c3abb7f1
......@@ -86,10 +86,6 @@ class VertexArrayVk : public VertexArrayImpl
const void *indices);
private:
void setPackedInputInfo(ContextVk *contextVk,
size_t attribIndex,
const gl::VertexAttribute &attrib,
const gl::VertexBinding &binding);
void setDefaultPackedInput(ContextVk *contextVk, size_t attribIndex);
angle::Result streamIndexData(ContextVk *contextVk,
......@@ -100,11 +96,13 @@ class VertexArrayVk : public VertexArrayImpl
angle::Result convertVertexBufferGpu(ContextVk *contextVk,
BufferVk *srcBuffer,
const gl::VertexBinding &binding,
size_t attribIndex);
size_t attribIndex,
const vk::Format &vertexFormat);
angle::Result convertVertexBufferCpu(ContextVk *contextVk,
BufferVk *srcBuffer,
const gl::VertexBinding &binding,
size_t attribIndex);
size_t attribIndex,
const vk::Format &vertexFormat);
void ensureConversionReleased(RendererVk *renderer, size_t attribIndex);
angle::Result syncDirtyAttrib(ContextVk *contextVk,
......@@ -115,8 +113,6 @@ class VertexArrayVk : public VertexArrayImpl
gl::AttribArray<VkBuffer> mCurrentArrayBufferHandles;
gl::AttribArray<VkDeviceSize> mCurrentArrayBufferOffsets;
gl::AttribArray<vk::BufferHelper *> mCurrentArrayBuffers;
gl::AttribArray<const vk::Format *> mCurrentArrayBufferFormats;
gl::AttribArray<GLuint> mCurrentArrayBufferStrides;
gl::AttribArray<vk::DynamicBuffer> mCurrentArrayBufferConversion;
gl::AttribArray<bool> mCurrentArrayBufferConversionCanRelease;
VkDeviceSize mCurrentElementArrayBufferOffset;
......
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