Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2016 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | // VertexArrayVk.cpp: |
| 7 | // Implements the class methods for VertexArrayVk. |
| 8 | // |
| 9 | |
| 10 | #include "libANGLE/renderer/vulkan/VertexArrayVk.h" |
| 11 | |
| 12 | #include "common/debug.h" |
| 13 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 14 | #include "libANGLE/Context.h" |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 15 | #include "libANGLE/renderer/vulkan/BufferVk.h" |
Jamie Madill | 1f46bc1 | 2018-02-20 16:09:43 -0500 | [diff] [blame] | 16 | #include "libANGLE/renderer/vulkan/CommandGraph.h" |
Jamie Madill | dd43e6c | 2017-03-24 14:18:49 -0400 | [diff] [blame] | 17 | #include "libANGLE/renderer/vulkan/ContextVk.h" |
Jamie Madill | 3c424b4 | 2018-01-19 12:35:09 -0500 | [diff] [blame] | 18 | #include "libANGLE/renderer/vulkan/vk_format_utils.h" |
Jamie Madill | dd43e6c | 2017-03-24 14:18:49 -0400 | [diff] [blame] | 19 | |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 20 | namespace rx |
| 21 | { |
| 22 | |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 23 | VertexArrayVk::VertexArrayVk(const gl::VertexArrayState &state) |
| 24 | : VertexArrayImpl(state), |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 25 | mCurrentArrayBufferHandles{}, |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 26 | mCurrentArrayBufferOffsets{}, |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 27 | mCurrentArrayBufferResources{}, |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 28 | mCurrentElementArrayBufferResource(nullptr) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 29 | { |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 30 | mCurrentArrayBufferHandles.fill(VK_NULL_HANDLE); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 31 | mCurrentArrayBufferOffsets.fill(0); |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 32 | mCurrentArrayBufferResources.fill(nullptr); |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 33 | |
| 34 | mPackedInputBindings.fill({0, 0}); |
| 35 | mPackedInputAttributes.fill({0, 0, 0}); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 36 | } |
| 37 | |
Jamie Madill | acf2f3a | 2017-11-21 19:22:44 -0500 | [diff] [blame] | 38 | VertexArrayVk::~VertexArrayVk() |
| 39 | { |
| 40 | } |
| 41 | |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 42 | void VertexArrayVk::destroy(const gl::Context *context) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 43 | { |
| 44 | } |
| 45 | |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 46 | gl::AttributesMask VertexArrayVk::getAttribsToStream(const gl::Context *context) const |
Frank Henigman | a53d0e1 | 2018-02-13 00:06:06 -0500 | [diff] [blame] | 47 | { |
| 48 | const gl::Program *programGL = context->getGLState().getProgram(); |
| 49 | return mClientMemoryAttribs & programGL->getActiveAttribLocationsMask(); |
| 50 | } |
| 51 | |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 52 | gl::Error VertexArrayVk::streamVertexData(const gl::Context *context, |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 53 | StreamingBuffer *stream, |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 54 | const gl::DrawCallParams &drawCallParams) |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 55 | { |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 56 | ContextVk *contextVk = vk::GetImpl(context); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 57 | const auto &attribs = mState.getVertexAttributes(); |
| 58 | const auto &bindings = mState.getVertexBindings(); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 59 | |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 60 | ANGLE_TRY(drawCallParams.ensureIndexRangeResolved(context)); |
| 61 | |
| 62 | const size_t lastVertex = drawCallParams.firstVertex() + drawCallParams.vertexCount(); |
| 63 | |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 64 | // TODO(fjhenigman): When we have a bunch of interleaved attributes, they end up |
| 65 | // un-interleaved, wasting space and copying time. Consider improving on that. |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 66 | for (auto attribIndex : getAttribsToStream(context)) |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 67 | { |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 68 | const gl::VertexAttribute &attrib = attribs[attribIndex]; |
| 69 | const gl::VertexBinding &binding = bindings[attrib.bindingIndex]; |
| 70 | ASSERT(attrib.enabled && binding.getBuffer().get() == nullptr); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 71 | |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 72 | // TODO(fjhenigman): Work with more formats than just GL_FLOAT. |
| 73 | if (attrib.type != GL_FLOAT) |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 74 | { |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 75 | UNIMPLEMENTED(); |
| 76 | return gl::InternalError(); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 77 | } |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 78 | |
| 79 | // Only [firstVertex, lastVertex] is needed by the upcoming draw so that |
| 80 | // is all we copy, but we allocate space for [0, lastVertex] so indexing |
| 81 | // will work. If we don't start at zero all the indices will be off. |
| 82 | // TODO(fjhenigman): See if we can account for indices being off by adjusting |
| 83 | // the offset, thus avoiding wasted memory. |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 84 | const size_t firstByte = drawCallParams.firstVertex() * binding.getStride(); |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 85 | const size_t lastByte = |
| 86 | lastVertex * binding.getStride() + gl::ComputeVertexAttributeTypeSize(attrib); |
| 87 | uint8_t *dst = nullptr; |
Luc Ferron | 7a06ac1 | 2018-03-15 10:17:04 -0400 | [diff] [blame] | 88 | uint32_t offset = 0; |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 89 | ANGLE_TRY(stream->allocate(contextVk, lastByte, &dst, |
Luc Ferron | 7a06ac1 | 2018-03-15 10:17:04 -0400 | [diff] [blame] | 90 | &mCurrentArrayBufferHandles[attribIndex], &offset, nullptr)); |
| 91 | mCurrentArrayBufferOffsets[attribIndex] = static_cast<VkDeviceSize>(offset); |
Frank Henigman | 6dd4a92 | 2018-03-02 16:35:13 -0500 | [diff] [blame] | 92 | memcpy(dst + firstByte, static_cast<const uint8_t *>(attrib.pointer) + firstByte, |
| 93 | lastByte - firstByte); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 94 | } |
| 95 | |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 96 | ANGLE_TRY(stream->flush(contextVk)); |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 97 | return gl::NoError(); |
| 98 | } |
| 99 | |
Frank Henigman | 0af5b86 | 2018-03-27 20:19:33 -0400 | [diff] [blame] | 100 | gl::Error VertexArrayVk::syncState(const gl::Context *context, |
| 101 | const gl::VertexArray::DirtyBits &dirtyBits, |
| 102 | const gl::VertexArray::DirtyAttribBitsArray &attribBits, |
| 103 | const gl::VertexArray::DirtyBindingBitsArray &bindingBits) |
Jamie Madill | dd43e6c | 2017-03-24 14:18:49 -0400 | [diff] [blame] | 104 | { |
| 105 | ASSERT(dirtyBits.any()); |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 106 | |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 107 | // Invalidate current pipeline. |
Jamie Madill | acf2f3a | 2017-11-21 19:22:44 -0500 | [diff] [blame] | 108 | ContextVk *contextVk = vk::GetImpl(context); |
Jamie Madill | 49ac74b | 2017-12-21 14:42:33 -0500 | [diff] [blame] | 109 | contextVk->onVertexArrayChange(); |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 110 | |
| 111 | // Rebuild current attribute buffers cache. This will fail horribly if the buffer changes. |
| 112 | // TODO(jmadill): Handle buffer storage changes. |
| 113 | const auto &attribs = mState.getVertexAttributes(); |
| 114 | const auto &bindings = mState.getVertexBindings(); |
| 115 | |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 116 | for (size_t dirtyBit : dirtyBits) |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 117 | { |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 118 | switch (dirtyBit) |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 119 | { |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 120 | case gl::VertexArray::DIRTY_BIT_ELEMENT_ARRAY_BUFFER: |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 121 | { |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 122 | gl::Buffer *bufferGL = mState.getElementArrayBuffer().get(); |
| 123 | if (bufferGL) |
| 124 | { |
| 125 | mCurrentElementArrayBufferResource = vk::GetImpl(bufferGL); |
| 126 | } |
| 127 | else |
| 128 | { |
| 129 | mCurrentElementArrayBufferResource = nullptr; |
| 130 | } |
| 131 | break; |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 132 | } |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 133 | |
| 134 | case gl::VertexArray::DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA: |
| 135 | break; |
| 136 | |
| 137 | default: |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 138 | { |
Jamie Madill | 0946393 | 2018-04-04 05:26:59 -0400 | [diff] [blame] | 139 | size_t attribIndex = gl::VertexArray::GetVertexIndexFromDirtyBit(dirtyBit); |
| 140 | |
| 141 | // Invalidate the input description for pipelines. |
| 142 | mDirtyPackedInputs.set(attribIndex); |
| 143 | |
| 144 | const auto &attrib = attribs[attribIndex]; |
| 145 | const auto &binding = bindings[attrib.bindingIndex]; |
| 146 | |
| 147 | if (attrib.enabled) |
| 148 | { |
| 149 | gl::Buffer *bufferGL = binding.getBuffer().get(); |
| 150 | |
| 151 | if (bufferGL) |
| 152 | { |
| 153 | BufferVk *bufferVk = vk::GetImpl(bufferGL); |
| 154 | mCurrentArrayBufferResources[attribIndex] = bufferVk; |
| 155 | mCurrentArrayBufferHandles[attribIndex] = |
| 156 | bufferVk->getVkBuffer().getHandle(); |
| 157 | mClientMemoryAttribs.reset(attribIndex); |
| 158 | } |
| 159 | else |
| 160 | { |
| 161 | mCurrentArrayBufferResources[attribIndex] = nullptr; |
| 162 | mCurrentArrayBufferHandles[attribIndex] = VK_NULL_HANDLE; |
| 163 | mClientMemoryAttribs.set(attribIndex); |
| 164 | } |
| 165 | // TODO(jmadill): Offset handling. Assume zero for now. |
| 166 | mCurrentArrayBufferOffsets[attribIndex] = 0; |
| 167 | } |
| 168 | else |
| 169 | { |
| 170 | mClientMemoryAttribs.reset(attribIndex); |
| 171 | UNIMPLEMENTED(); |
| 172 | } |
| 173 | break; |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 174 | } |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 175 | } |
| 176 | } |
Frank Henigman | 0af5b86 | 2018-03-27 20:19:33 -0400 | [diff] [blame] | 177 | |
| 178 | return gl::NoError(); |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 179 | } |
| 180 | |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 181 | const gl::AttribArray<VkBuffer> &VertexArrayVk::getCurrentArrayBufferHandles() const |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 182 | { |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 183 | return mCurrentArrayBufferHandles; |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 184 | } |
| 185 | |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 186 | const gl::AttribArray<VkDeviceSize> &VertexArrayVk::getCurrentArrayBufferOffsets() const |
| 187 | { |
| 188 | return mCurrentArrayBufferOffsets; |
| 189 | } |
| 190 | |
Jamie Madill | 1f46bc1 | 2018-02-20 16:09:43 -0500 | [diff] [blame] | 191 | void VertexArrayVk::updateDrawDependencies(vk::CommandGraphNode *readNode, |
Jamie Madill | 49ac74b | 2017-12-21 14:42:33 -0500 | [diff] [blame] | 192 | const gl::AttributesMask &activeAttribsMask, |
Luc Ferron | 78e39b3 | 2018-02-26 07:42:44 -0500 | [diff] [blame] | 193 | ResourceVk *elementArrayBufferOverride, |
Jamie Madill | 49ac74b | 2017-12-21 14:42:33 -0500 | [diff] [blame] | 194 | Serial serial, |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 195 | bool isDrawElements) |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 196 | { |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 197 | // Handle the bound array buffers. |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 198 | for (auto attribIndex : activeAttribsMask) |
| 199 | { |
Frank Henigman | 1744895 | 2017-01-05 15:48:26 -0500 | [diff] [blame] | 200 | if (mCurrentArrayBufferResources[attribIndex]) |
| 201 | mCurrentArrayBufferResources[attribIndex]->onReadResource(readNode, serial); |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | // Handle the bound element array buffer. |
Jamie Madill | 32fd63b | 2018-03-31 11:20:35 -0400 | [diff] [blame^] | 205 | if (isDrawElements) |
Jamie Madill | da854a2 | 2017-11-30 17:24:21 -0500 | [diff] [blame] | 206 | { |
Luc Ferron | 78e39b3 | 2018-02-26 07:42:44 -0500 | [diff] [blame] | 207 | if (elementArrayBufferOverride != nullptr) |
| 208 | { |
| 209 | elementArrayBufferOverride->onReadResource(readNode, serial); |
| 210 | } |
Frank Henigman | 5d232d5 | 2018-04-01 19:57:19 -0400 | [diff] [blame] | 211 | else if (mCurrentElementArrayBufferResource != nullptr) |
Luc Ferron | 78e39b3 | 2018-02-26 07:42:44 -0500 | [diff] [blame] | 212 | { |
Luc Ferron | 78e39b3 | 2018-02-26 07:42:44 -0500 | [diff] [blame] | 213 | mCurrentElementArrayBufferResource->onReadResource(readNode, serial); |
| 214 | } |
Jamie Madill | bd159f0 | 2017-10-09 19:39:06 -0400 | [diff] [blame] | 215 | } |
Jamie Madill | dd43e6c | 2017-03-24 14:18:49 -0400 | [diff] [blame] | 216 | } |
| 217 | |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 218 | void VertexArrayVk::getPackedInputDescriptions(vk::PipelineDesc *pipelineDesc) |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 219 | { |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 220 | updatePackedInputDescriptions(); |
| 221 | pipelineDesc->updateVertexInputInfo(mPackedInputBindings, mPackedInputAttributes); |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 222 | } |
| 223 | |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 224 | void VertexArrayVk::updatePackedInputDescriptions() |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 225 | { |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 226 | if (!mDirtyPackedInputs.any()) |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 227 | { |
| 228 | return; |
| 229 | } |
| 230 | |
| 231 | const auto &attribs = mState.getVertexAttributes(); |
| 232 | const auto &bindings = mState.getVertexBindings(); |
| 233 | |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 234 | for (auto attribIndex : mDirtyPackedInputs) |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 235 | { |
| 236 | const auto &attrib = attribs[attribIndex]; |
| 237 | const auto &binding = bindings[attrib.bindingIndex]; |
| 238 | if (attrib.enabled) |
| 239 | { |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 240 | updatePackedInputInfo(static_cast<uint32_t>(attribIndex), binding, attrib); |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 241 | } |
| 242 | else |
| 243 | { |
| 244 | UNIMPLEMENTED(); |
| 245 | } |
| 246 | } |
| 247 | |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 248 | mDirtyPackedInputs.reset(); |
| 249 | } |
| 250 | |
| 251 | void VertexArrayVk::updatePackedInputInfo(uint32_t attribIndex, |
| 252 | const gl::VertexBinding &binding, |
| 253 | const gl::VertexAttribute &attrib) |
| 254 | { |
| 255 | vk::PackedVertexInputBindingDesc &bindingDesc = mPackedInputBindings[attribIndex]; |
| 256 | |
| 257 | size_t attribSize = gl::ComputeVertexAttributeTypeSize(attrib); |
| 258 | ASSERT(attribSize <= std::numeric_limits<uint16_t>::max()); |
| 259 | |
Frank Henigman | a8e868f | 2018-01-28 23:32:25 -0500 | [diff] [blame] | 260 | bindingDesc.stride = static_cast<uint16_t>(binding.getStride()); |
Jamie Madill | 112a3a8 | 2018-01-23 13:04:06 -0500 | [diff] [blame] | 261 | bindingDesc.inputRate = static_cast<uint16_t>( |
| 262 | binding.getDivisor() > 0 ? VK_VERTEX_INPUT_RATE_INSTANCE : VK_VERTEX_INPUT_RATE_VERTEX); |
| 263 | |
| 264 | gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib); |
| 265 | VkFormat vkFormat = vk::GetNativeVertexFormat(vertexFormatType); |
| 266 | ASSERT(vkFormat <= std::numeric_limits<uint16_t>::max()); |
| 267 | |
| 268 | vk::PackedVertexInputAttributeDesc &attribDesc = mPackedInputAttributes[attribIndex]; |
| 269 | attribDesc.format = static_cast<uint16_t>(vkFormat); |
| 270 | attribDesc.location = static_cast<uint16_t>(attribIndex); |
| 271 | attribDesc.offset = static_cast<uint32_t>(ComputeVertexAttributeOffset(attrib, binding)); |
Jamie Madill | ebf7299 | 2017-10-13 14:09:45 -0400 | [diff] [blame] | 272 | } |
| 273 | |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 274 | } // namespace rx |