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 | // ContextVk.cpp: |
| 7 | // Implements the class methods for ContextVk. |
| 8 | // |
| 9 | |
| 10 | #include "libANGLE/renderer/vulkan/ContextVk.h" |
| 11 | |
Jamie Madill | 20e005b | 2017-04-07 14:19:22 -0400 | [diff] [blame] | 12 | #include "common/bitset_utils.h" |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 13 | #include "common/debug.h" |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 14 | #include "libANGLE/Program.h" |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 15 | #include "libANGLE/renderer/vulkan/BufferVk.h" |
| 16 | #include "libANGLE/renderer/vulkan/CompilerVk.h" |
| 17 | #include "libANGLE/renderer/vulkan/ContextVk.h" |
| 18 | #include "libANGLE/renderer/vulkan/DeviceVk.h" |
| 19 | #include "libANGLE/renderer/vulkan/FenceNVVk.h" |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 20 | #include "libANGLE/renderer/vulkan/FramebufferVk.h" |
| 21 | #include "libANGLE/renderer/vulkan/ImageVk.h" |
Yunchao He | a336b90 | 2017-08-02 16:05:21 +0800 | [diff] [blame] | 22 | #include "libANGLE/renderer/vulkan/ProgramPipelineVk.h" |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 23 | #include "libANGLE/renderer/vulkan/ProgramVk.h" |
| 24 | #include "libANGLE/renderer/vulkan/QueryVk.h" |
| 25 | #include "libANGLE/renderer/vulkan/RenderbufferVk.h" |
| 26 | #include "libANGLE/renderer/vulkan/RendererVk.h" |
| 27 | #include "libANGLE/renderer/vulkan/SamplerVk.h" |
| 28 | #include "libANGLE/renderer/vulkan/ShaderVk.h" |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 29 | #include "libANGLE/renderer/vulkan/SyncVk.h" |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 30 | #include "libANGLE/renderer/vulkan/TextureVk.h" |
| 31 | #include "libANGLE/renderer/vulkan/TransformFeedbackVk.h" |
| 32 | #include "libANGLE/renderer/vulkan/VertexArrayVk.h" |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 33 | #include "libANGLE/renderer/vulkan/formatutilsvk.h" |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 34 | |
| 35 | namespace rx |
| 36 | { |
| 37 | |
Jamie Madill | d03a849 | 2017-10-03 15:46:06 -0400 | [diff] [blame^] | 38 | namespace |
| 39 | { |
| 40 | |
| 41 | VkIndexType GetVkIndexType(GLenum glIndexType) |
| 42 | { |
| 43 | switch (glIndexType) |
| 44 | { |
| 45 | case GL_UNSIGNED_SHORT: |
| 46 | return VK_INDEX_TYPE_UINT16; |
| 47 | case GL_UNSIGNED_INT: |
| 48 | return VK_INDEX_TYPE_UINT32; |
| 49 | default: |
| 50 | UNREACHABLE(); |
| 51 | return VK_INDEX_TYPE_MAX_ENUM; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | } // anonymous namespace |
| 56 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 57 | ContextVk::ContextVk(const gl::ContextState &state, RendererVk *renderer) |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 58 | : ContextImpl(state), mRenderer(renderer), mCurrentDrawMode(GL_NONE) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 59 | { |
| 60 | } |
| 61 | |
| 62 | ContextVk::~ContextVk() |
| 63 | { |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 64 | invalidateCurrentPipeline(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | gl::Error ContextVk::initialize() |
| 68 | { |
Jamie Madill | e09bd5d | 2016-11-29 16:20:35 -0500 | [diff] [blame] | 69 | return gl::NoError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | gl::Error ContextVk::flush() |
| 73 | { |
| 74 | UNIMPLEMENTED(); |
Yuly Novikov | c4d18aa | 2017-03-09 18:45:02 -0500 | [diff] [blame] | 75 | return gl::InternalError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | gl::Error ContextVk::finish() |
| 79 | { |
| 80 | UNIMPLEMENTED(); |
Yuly Novikov | c4d18aa | 2017-03-09 18:45:02 -0500 | [diff] [blame] | 81 | return gl::InternalError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 82 | } |
| 83 | |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 84 | gl::Error ContextVk::initPipeline(const gl::Context *context) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 85 | { |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 86 | ASSERT(!mCurrentPipeline.valid()); |
| 87 | |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 88 | VkDevice device = mRenderer->getDevice(); |
| 89 | const auto &state = mState.getState(); |
| 90 | const auto &programGL = state.getProgram(); |
| 91 | const auto &vao = state.getVertexArray(); |
| 92 | const auto &attribs = vao->getVertexAttributes(); |
Jiawei-Shao | 2597fb6 | 2016-12-09 16:38:02 +0800 | [diff] [blame] | 93 | const auto &bindings = vao->getVertexBindings(); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 94 | const auto &programVk = GetImplAs<ProgramVk>(programGL); |
| 95 | const auto *drawFBO = state.getDrawFramebuffer(); |
| 96 | FramebufferVk *vkFBO = GetImplAs<FramebufferVk>(drawFBO); |
| 97 | |
| 98 | // { vertex, fragment } |
| 99 | VkPipelineShaderStageCreateInfo shaderStages[2]; |
| 100 | |
| 101 | shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; |
| 102 | shaderStages[0].pNext = nullptr; |
| 103 | shaderStages[0].flags = 0; |
| 104 | shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT; |
| 105 | shaderStages[0].module = programVk->getLinkedVertexModule().getHandle(); |
| 106 | shaderStages[0].pName = "main"; |
| 107 | shaderStages[0].pSpecializationInfo = nullptr; |
| 108 | |
| 109 | shaderStages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; |
| 110 | shaderStages[1].pNext = nullptr; |
| 111 | shaderStages[1].flags = 0; |
| 112 | shaderStages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT; |
| 113 | shaderStages[1].module = programVk->getLinkedFragmentModule().getHandle(); |
| 114 | shaderStages[1].pName = "main"; |
| 115 | shaderStages[1].pSpecializationInfo = nullptr; |
| 116 | |
| 117 | // Process vertex attributes |
| 118 | // TODO(jmadill): Caching with dirty bits. |
| 119 | std::vector<VkVertexInputBindingDescription> vertexBindings; |
| 120 | std::vector<VkVertexInputAttributeDescription> vertexAttribs; |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 121 | |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 122 | for (auto attribIndex : programGL->getActiveAttribLocationsMask()) |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 123 | { |
Jamie Madill | 231c7f5 | 2017-04-26 13:45:37 -0400 | [diff] [blame] | 124 | const auto &attrib = attribs[attribIndex]; |
Jiawei-Shao | 2597fb6 | 2016-12-09 16:38:02 +0800 | [diff] [blame] | 125 | const auto &binding = bindings[attrib.bindingIndex]; |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 126 | if (attrib.enabled) |
| 127 | { |
| 128 | VkVertexInputBindingDescription bindingDesc; |
| 129 | bindingDesc.binding = static_cast<uint32_t>(vertexBindings.size()); |
| 130 | bindingDesc.stride = static_cast<uint32_t>(gl::ComputeVertexAttributeTypeSize(attrib)); |
Martin Radev | dd5f27e | 2017-06-07 10:17:09 +0300 | [diff] [blame] | 131 | bindingDesc.inputRate = (binding.getDivisor() > 0 ? VK_VERTEX_INPUT_RATE_INSTANCE |
| 132 | : VK_VERTEX_INPUT_RATE_VERTEX); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 133 | |
| 134 | gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib); |
| 135 | |
| 136 | VkVertexInputAttributeDescription attribDesc; |
| 137 | attribDesc.binding = bindingDesc.binding; |
| 138 | attribDesc.format = vk::GetNativeVertexFormat(vertexFormatType); |
| 139 | attribDesc.location = static_cast<uint32_t>(attribIndex); |
Jiawei-Shao | 2597fb6 | 2016-12-09 16:38:02 +0800 | [diff] [blame] | 140 | attribDesc.offset = |
| 141 | static_cast<uint32_t>(ComputeVertexAttributeOffset(attrib, binding)); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 142 | |
| 143 | vertexBindings.push_back(bindingDesc); |
| 144 | vertexAttribs.push_back(attribDesc); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 145 | } |
| 146 | else |
| 147 | { |
| 148 | UNIMPLEMENTED(); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | // TODO(jmadill): Validate with ASSERT against physical device limits/caps? |
| 153 | VkPipelineVertexInputStateCreateInfo vertexInputState; |
| 154 | vertexInputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; |
| 155 | vertexInputState.pNext = nullptr; |
| 156 | vertexInputState.flags = 0; |
| 157 | vertexInputState.vertexBindingDescriptionCount = static_cast<uint32_t>(vertexBindings.size()); |
| 158 | vertexInputState.pVertexBindingDescriptions = vertexBindings.data(); |
| 159 | vertexInputState.vertexAttributeDescriptionCount = static_cast<uint32_t>(vertexAttribs.size()); |
| 160 | vertexInputState.pVertexAttributeDescriptions = vertexAttribs.data(); |
| 161 | |
| 162 | VkPipelineInputAssemblyStateCreateInfo inputAssemblyState; |
| 163 | inputAssemblyState.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; |
| 164 | inputAssemblyState.pNext = nullptr; |
| 165 | inputAssemblyState.flags = 0; |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 166 | inputAssemblyState.topology = gl_vk::GetPrimitiveTopology(mCurrentDrawMode); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 167 | inputAssemblyState.primitiveRestartEnable = VK_FALSE; |
| 168 | |
| 169 | const gl::Rectangle &viewportGL = state.getViewport(); |
| 170 | VkViewport viewportVk; |
| 171 | viewportVk.x = static_cast<float>(viewportGL.x); |
| 172 | viewportVk.y = static_cast<float>(viewportGL.y); |
| 173 | viewportVk.width = static_cast<float>(viewportGL.width); |
| 174 | viewportVk.height = static_cast<float>(viewportGL.height); |
| 175 | viewportVk.minDepth = state.getNearPlane(); |
| 176 | viewportVk.maxDepth = state.getFarPlane(); |
| 177 | |
| 178 | // TODO(jmadill): Scissor. |
| 179 | VkRect2D scissorVk; |
| 180 | scissorVk.offset.x = viewportGL.x; |
| 181 | scissorVk.offset.y = viewportGL.y; |
| 182 | scissorVk.extent.width = viewportGL.width; |
| 183 | scissorVk.extent.height = viewportGL.height; |
| 184 | |
| 185 | VkPipelineViewportStateCreateInfo viewportState; |
| 186 | viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; |
| 187 | viewportState.pNext = nullptr; |
| 188 | viewportState.flags = 0; |
| 189 | viewportState.viewportCount = 1; |
| 190 | viewportState.pViewports = &viewportVk; |
| 191 | viewportState.scissorCount = 1; |
| 192 | viewportState.pScissors = &scissorVk; |
| 193 | |
| 194 | // TODO(jmadill): Extra rasterizer state features. |
| 195 | VkPipelineRasterizationStateCreateInfo rasterState; |
| 196 | rasterState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; |
| 197 | rasterState.pNext = nullptr; |
| 198 | rasterState.flags = 0; |
| 199 | rasterState.depthClampEnable = VK_FALSE; |
| 200 | rasterState.rasterizerDiscardEnable = VK_FALSE; |
| 201 | rasterState.polygonMode = VK_POLYGON_MODE_FILL; |
| 202 | rasterState.cullMode = gl_vk::GetCullMode(state.getRasterizerState()); |
| 203 | rasterState.frontFace = gl_vk::GetFrontFace(state.getRasterizerState().frontFace); |
| 204 | rasterState.depthBiasEnable = VK_FALSE; |
| 205 | rasterState.depthBiasConstantFactor = 0.0f; |
| 206 | rasterState.depthBiasClamp = 0.0f; |
| 207 | rasterState.depthBiasSlopeFactor = 0.0f; |
| 208 | rasterState.lineWidth = state.getLineWidth(); |
| 209 | |
| 210 | // TODO(jmadill): Multisample state. |
| 211 | VkPipelineMultisampleStateCreateInfo multisampleState; |
| 212 | multisampleState.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; |
| 213 | multisampleState.pNext = nullptr; |
| 214 | multisampleState.flags = 0; |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 215 | multisampleState.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; |
| 216 | multisampleState.sampleShadingEnable = VK_FALSE; |
| 217 | multisampleState.minSampleShading = 0.0f; |
| 218 | multisampleState.pSampleMask = nullptr; |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 219 | multisampleState.alphaToCoverageEnable = VK_FALSE; |
| 220 | multisampleState.alphaToOneEnable = VK_FALSE; |
| 221 | |
| 222 | // TODO(jmadill): Depth/stencil state. |
| 223 | |
| 224 | // TODO(jmadill): Blend state/MRT. |
| 225 | VkPipelineColorBlendAttachmentState blendAttachmentState; |
| 226 | blendAttachmentState.blendEnable = VK_FALSE; |
| 227 | blendAttachmentState.srcColorBlendFactor = VK_BLEND_FACTOR_ONE; |
| 228 | blendAttachmentState.dstColorBlendFactor = VK_BLEND_FACTOR_ONE; |
| 229 | blendAttachmentState.colorBlendOp = VK_BLEND_OP_ADD; |
| 230 | blendAttachmentState.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE; |
| 231 | blendAttachmentState.dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE; |
| 232 | blendAttachmentState.alphaBlendOp = VK_BLEND_OP_ADD; |
| 233 | blendAttachmentState.colorWriteMask = (VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | |
| 234 | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT); |
| 235 | |
| 236 | VkPipelineColorBlendStateCreateInfo blendState; |
| 237 | blendState.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; |
| 238 | blendState.pNext = 0; |
| 239 | blendState.flags = 0; |
| 240 | blendState.logicOpEnable = VK_FALSE; |
| 241 | blendState.logicOp = VK_LOGIC_OP_CLEAR; |
| 242 | blendState.attachmentCount = 1; |
| 243 | blendState.pAttachments = &blendAttachmentState; |
| 244 | blendState.blendConstants[0] = 0.0f; |
| 245 | blendState.blendConstants[1] = 0.0f; |
| 246 | blendState.blendConstants[2] = 0.0f; |
| 247 | blendState.blendConstants[3] = 0.0f; |
| 248 | |
| 249 | // TODO(jmadill): Dynamic state. |
| 250 | vk::RenderPass *renderPass = nullptr; |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 251 | ANGLE_TRY_RESULT(vkFBO->getRenderPass(context, device), renderPass); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 252 | ASSERT(renderPass && renderPass->valid()); |
| 253 | |
| 254 | vk::PipelineLayout *pipelineLayout = nullptr; |
| 255 | ANGLE_TRY_RESULT(programVk->getPipelineLayout(device), pipelineLayout); |
| 256 | ASSERT(pipelineLayout && pipelineLayout->valid()); |
| 257 | |
| 258 | VkGraphicsPipelineCreateInfo pipelineInfo; |
| 259 | pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; |
| 260 | pipelineInfo.pNext = nullptr; |
| 261 | pipelineInfo.flags = 0; |
| 262 | pipelineInfo.stageCount = 2; |
| 263 | pipelineInfo.pStages = shaderStages; |
| 264 | pipelineInfo.pVertexInputState = &vertexInputState; |
| 265 | pipelineInfo.pInputAssemblyState = &inputAssemblyState; |
| 266 | pipelineInfo.pTessellationState = nullptr; |
| 267 | pipelineInfo.pViewportState = &viewportState; |
| 268 | pipelineInfo.pRasterizationState = &rasterState; |
| 269 | pipelineInfo.pMultisampleState = &multisampleState; |
| 270 | pipelineInfo.pDepthStencilState = nullptr; |
| 271 | pipelineInfo.pColorBlendState = &blendState; |
| 272 | pipelineInfo.pDynamicState = nullptr; |
| 273 | pipelineInfo.layout = pipelineLayout->getHandle(); |
| 274 | pipelineInfo.renderPass = renderPass->getHandle(); |
| 275 | pipelineInfo.subpass = 0; |
| 276 | pipelineInfo.basePipelineHandle = VK_NULL_HANDLE; |
| 277 | pipelineInfo.basePipelineIndex = 0; |
| 278 | |
Jamie Madill | 5deea72 | 2017-02-16 10:44:46 -0500 | [diff] [blame] | 279 | vk::Pipeline newPipeline; |
| 280 | ANGLE_TRY(newPipeline.initGraphics(device, pipelineInfo)); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 281 | |
Jamie Madill | 5deea72 | 2017-02-16 10:44:46 -0500 | [diff] [blame] | 282 | mCurrentPipeline.retain(device, std::move(newPipeline)); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 283 | |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 284 | return gl::NoError(); |
| 285 | } |
| 286 | |
Jamie Madill | d03a849 | 2017-10-03 15:46:06 -0400 | [diff] [blame^] | 287 | gl::Error ContextVk::setupDraw(const gl::Context *context, GLenum mode) |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 288 | { |
| 289 | if (mode != mCurrentDrawMode) |
| 290 | { |
| 291 | invalidateCurrentPipeline(); |
| 292 | mCurrentDrawMode = mode; |
| 293 | } |
| 294 | |
| 295 | if (!mCurrentPipeline.valid()) |
| 296 | { |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 297 | ANGLE_TRY(initPipeline(context)); |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 298 | ASSERT(mCurrentPipeline.valid()); |
| 299 | } |
| 300 | |
| 301 | VkDevice device = mRenderer->getDevice(); |
| 302 | const auto &state = mState.getState(); |
| 303 | const auto &programGL = state.getProgram(); |
| 304 | const auto &vao = state.getVertexArray(); |
| 305 | const auto &attribs = vao->getVertexAttributes(); |
| 306 | const auto &bindings = vao->getVertexBindings(); |
| 307 | const auto *drawFBO = state.getDrawFramebuffer(); |
| 308 | FramebufferVk *vkFBO = GetImplAs<FramebufferVk>(drawFBO); |
| 309 | Serial queueSerial = mRenderer->getCurrentQueueSerial(); |
| 310 | |
| 311 | // Process vertex attributes |
| 312 | // TODO(jmadill): Caching with dirty bits. |
| 313 | std::vector<VkBuffer> vertexHandles; |
| 314 | std::vector<VkDeviceSize> vertexOffsets; |
| 315 | |
Jamie Madill | 6de5185 | 2017-04-12 09:53:01 -0400 | [diff] [blame] | 316 | for (auto attribIndex : programGL->getActiveAttribLocationsMask()) |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 317 | { |
| 318 | const auto &attrib = attribs[attribIndex]; |
| 319 | const auto &binding = bindings[attrib.bindingIndex]; |
| 320 | if (attrib.enabled) |
| 321 | { |
| 322 | // TODO(jmadill): Offset handling. |
Martin Radev | dd5f27e | 2017-06-07 10:17:09 +0300 | [diff] [blame] | 323 | gl::Buffer *bufferGL = binding.getBuffer().get(); |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 324 | ASSERT(bufferGL); |
| 325 | BufferVk *bufferVk = GetImplAs<BufferVk>(bufferGL); |
| 326 | vertexHandles.push_back(bufferVk->getVkBuffer().getHandle()); |
| 327 | vertexOffsets.push_back(0); |
| 328 | |
| 329 | bufferVk->setQueueSerial(queueSerial); |
| 330 | } |
| 331 | else |
| 332 | { |
| 333 | UNIMPLEMENTED(); |
| 334 | } |
| 335 | } |
| 336 | |
Jamie Madill | 0c0dc34 | 2017-03-24 14:18:51 -0400 | [diff] [blame] | 337 | vk::CommandBuffer *commandBuffer = nullptr; |
| 338 | ANGLE_TRY(mRenderer->getStartedCommandBuffer(&commandBuffer)); |
Jamie Madill | d482615 | 2017-09-21 11:18:59 -0400 | [diff] [blame] | 339 | ANGLE_TRY(vkFBO->ensureInRenderPass(context, device, commandBuffer, queueSerial, state)); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 340 | |
| 341 | commandBuffer->bindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, mCurrentPipeline); |
Jamie Madill | abd3135 | 2017-09-19 00:24:58 -0400 | [diff] [blame] | 342 | // TODO(jmadill): the queue serial should be bound to the pipeline. |
| 343 | setQueueSerial(queueSerial); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 344 | commandBuffer->bindVertexBuffers(0, vertexHandles, vertexOffsets); |
Jamie Madill | df68a6f | 2017-01-13 17:29:53 -0500 | [diff] [blame] | 345 | |
| 346 | return gl::NoError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 347 | } |
| 348 | |
Jamie Madill | d03a849 | 2017-10-03 15:46:06 -0400 | [diff] [blame^] | 349 | gl::Error ContextVk::drawArrays(const gl::Context *context, GLenum mode, GLint first, GLsizei count) |
| 350 | { |
| 351 | ANGLE_TRY(setupDraw(context, mode)); |
| 352 | |
| 353 | vk::CommandBuffer *commandBuffer = nullptr; |
| 354 | ANGLE_TRY(mRenderer->getStartedCommandBuffer(&commandBuffer)); |
| 355 | |
| 356 | commandBuffer->draw(count, 1, first, 0); |
| 357 | return gl::NoError(); |
| 358 | } |
| 359 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 360 | gl::Error ContextVk::drawArraysInstanced(const gl::Context *context, |
| 361 | GLenum mode, |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 362 | GLint first, |
| 363 | GLsizei count, |
| 364 | GLsizei instanceCount) |
| 365 | { |
| 366 | UNIMPLEMENTED(); |
Yuly Novikov | c4d18aa | 2017-03-09 18:45:02 -0500 | [diff] [blame] | 367 | return gl::InternalError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 368 | } |
| 369 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 370 | gl::Error ContextVk::drawElements(const gl::Context *context, |
| 371 | GLenum mode, |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 372 | GLsizei count, |
| 373 | GLenum type, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 374 | const void *indices) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 375 | { |
Jamie Madill | d03a849 | 2017-10-03 15:46:06 -0400 | [diff] [blame^] | 376 | ANGLE_TRY(setupDraw(context, mode)); |
| 377 | |
| 378 | if (indices) |
| 379 | { |
| 380 | // TODO(jmadill): Buffer offsets and immediate data. |
| 381 | UNIMPLEMENTED(); |
| 382 | return gl::InternalError() << "Only zero-offset index buffers are currently implemented."; |
| 383 | } |
| 384 | |
| 385 | if (type == GL_UNSIGNED_BYTE) |
| 386 | { |
| 387 | // TODO(jmadill): Index translation. |
| 388 | UNIMPLEMENTED(); |
| 389 | return gl::InternalError() << "Unsigned byte translation is not yet implemented."; |
| 390 | } |
| 391 | |
| 392 | vk::CommandBuffer *commandBuffer = nullptr; |
| 393 | ANGLE_TRY(mRenderer->getStartedCommandBuffer(&commandBuffer)); |
| 394 | |
| 395 | const gl::Buffer *elementArrayBuffer = |
| 396 | mState.getState().getVertexArray()->getElementArrayBuffer().get(); |
| 397 | ASSERT(elementArrayBuffer); |
| 398 | |
| 399 | BufferVk *elementArrayBufferVk = GetImplAs<BufferVk>(elementArrayBuffer); |
| 400 | |
| 401 | commandBuffer->bindIndexBuffer(elementArrayBufferVk->getVkBuffer(), 0, GetVkIndexType(type)); |
| 402 | commandBuffer->drawIndexed(count, 1, 0, 0, 0); |
| 403 | |
| 404 | return gl::NoError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 405 | } |
| 406 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 407 | gl::Error ContextVk::drawElementsInstanced(const gl::Context *context, |
| 408 | GLenum mode, |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 409 | GLsizei count, |
| 410 | GLenum type, |
Jamie Madill | 876429b | 2017-04-20 15:46:24 -0400 | [diff] [blame] | 411 | const void *indices, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 412 | GLsizei instances) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 413 | { |
| 414 | UNIMPLEMENTED(); |
Yuly Novikov | c4d18aa | 2017-03-09 18:45:02 -0500 | [diff] [blame] | 415 | return gl::InternalError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 416 | } |
| 417 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 418 | gl::Error ContextVk::drawRangeElements(const gl::Context *context, |
| 419 | GLenum mode, |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 420 | GLuint start, |
| 421 | GLuint end, |
| 422 | GLsizei count, |
| 423 | GLenum type, |
Qin Jiajia | 1da0065 | 2017-06-20 17:16:25 +0800 | [diff] [blame] | 424 | const void *indices) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 425 | { |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 426 | return gl::NoError(); |
| 427 | } |
| 428 | |
| 429 | VkDevice ContextVk::getDevice() const |
| 430 | { |
| 431 | return mRenderer->getDevice(); |
| 432 | } |
| 433 | |
Jamie Madill | 0c0dc34 | 2017-03-24 14:18:51 -0400 | [diff] [blame] | 434 | vk::Error ContextVk::getStartedCommandBuffer(vk::CommandBuffer **commandBufferOut) |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 435 | { |
Jamie Madill | 0c0dc34 | 2017-03-24 14:18:51 -0400 | [diff] [blame] | 436 | return mRenderer->getStartedCommandBuffer(commandBufferOut); |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 437 | } |
| 438 | |
Jamie Madill | 0c0dc34 | 2017-03-24 14:18:51 -0400 | [diff] [blame] | 439 | vk::Error ContextVk::submitCommands(vk::CommandBuffer *commandBuffer) |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 440 | { |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 441 | setQueueSerial(mRenderer->getCurrentQueueSerial()); |
Jamie Madill | f651c77 | 2017-02-21 15:03:51 -0500 | [diff] [blame] | 442 | ANGLE_TRY(mRenderer->submitCommandBuffer(commandBuffer)); |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 443 | return vk::NoError(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 444 | } |
| 445 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 446 | gl::Error ContextVk::drawArraysIndirect(const gl::Context *context, |
| 447 | GLenum mode, |
| 448 | const void *indirect) |
Jiajia Qin | d967122 | 2016-11-29 16:30:31 +0800 | [diff] [blame] | 449 | { |
| 450 | UNIMPLEMENTED(); |
| 451 | return gl::InternalError() << "DrawArraysIndirect hasn't been implemented for vulkan backend."; |
| 452 | } |
| 453 | |
Jamie Madill | c564c07 | 2017-06-01 12:45:42 -0400 | [diff] [blame] | 454 | gl::Error ContextVk::drawElementsIndirect(const gl::Context *context, |
| 455 | GLenum mode, |
| 456 | GLenum type, |
| 457 | const void *indirect) |
Jiajia Qin | d967122 | 2016-11-29 16:30:31 +0800 | [diff] [blame] | 458 | { |
| 459 | UNIMPLEMENTED(); |
| 460 | return gl::InternalError() |
| 461 | << "DrawElementsIndirect hasn't been implemented for vulkan backend."; |
| 462 | } |
| 463 | |
Corentin Wallez | 87fbe1c | 2016-08-03 14:41:42 -0400 | [diff] [blame] | 464 | GLenum ContextVk::getResetStatus() |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 465 | { |
| 466 | UNIMPLEMENTED(); |
Corentin Wallez | 87fbe1c | 2016-08-03 14:41:42 -0400 | [diff] [blame] | 467 | return GL_NO_ERROR; |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 468 | } |
| 469 | |
| 470 | std::string ContextVk::getVendorString() const |
| 471 | { |
| 472 | UNIMPLEMENTED(); |
| 473 | return std::string(); |
| 474 | } |
| 475 | |
| 476 | std::string ContextVk::getRendererDescription() const |
| 477 | { |
Jamie Madill | e09bd5d | 2016-11-29 16:20:35 -0500 | [diff] [blame] | 478 | return mRenderer->getRendererDescription(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 479 | } |
| 480 | |
| 481 | void ContextVk::insertEventMarker(GLsizei length, const char *marker) |
| 482 | { |
| 483 | UNIMPLEMENTED(); |
| 484 | } |
| 485 | |
| 486 | void ContextVk::pushGroupMarker(GLsizei length, const char *marker) |
| 487 | { |
| 488 | UNIMPLEMENTED(); |
| 489 | } |
| 490 | |
| 491 | void ContextVk::popGroupMarker() |
| 492 | { |
| 493 | UNIMPLEMENTED(); |
| 494 | } |
| 495 | |
Jamie Madill | fe54834 | 2017-06-19 11:13:24 -0400 | [diff] [blame] | 496 | void ContextVk::syncState(const gl::Context *context, const gl::State::DirtyBits &dirtyBits) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 497 | { |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 498 | // TODO(jmadill): Vulkan dirty bits. |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 499 | if (dirtyBits.any()) |
| 500 | { |
| 501 | invalidateCurrentPipeline(); |
| 502 | } |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 503 | } |
| 504 | |
| 505 | GLint ContextVk::getGPUDisjoint() |
| 506 | { |
| 507 | UNIMPLEMENTED(); |
| 508 | return GLint(); |
| 509 | } |
| 510 | |
| 511 | GLint64 ContextVk::getTimestamp() |
| 512 | { |
| 513 | UNIMPLEMENTED(); |
| 514 | return GLint64(); |
| 515 | } |
| 516 | |
Jamie Madill | 4928b7c | 2017-06-20 12:57:39 -0400 | [diff] [blame] | 517 | void ContextVk::onMakeCurrent(const gl::Context * /*context*/) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 518 | { |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 519 | } |
| 520 | |
| 521 | const gl::Caps &ContextVk::getNativeCaps() const |
| 522 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 523 | return mRenderer->getNativeCaps(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 524 | } |
| 525 | |
| 526 | const gl::TextureCapsMap &ContextVk::getNativeTextureCaps() const |
| 527 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 528 | return mRenderer->getNativeTextureCaps(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | const gl::Extensions &ContextVk::getNativeExtensions() const |
| 532 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 533 | return mRenderer->getNativeExtensions(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 534 | } |
| 535 | |
| 536 | const gl::Limitations &ContextVk::getNativeLimitations() const |
| 537 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 538 | return mRenderer->getNativeLimitations(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 539 | } |
| 540 | |
| 541 | CompilerImpl *ContextVk::createCompiler() |
| 542 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 543 | return new CompilerVk(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 544 | } |
| 545 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 546 | ShaderImpl *ContextVk::createShader(const gl::ShaderState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 547 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 548 | return new ShaderVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 549 | } |
| 550 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 551 | ProgramImpl *ContextVk::createProgram(const gl::ProgramState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 552 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 553 | return new ProgramVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 554 | } |
| 555 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 556 | FramebufferImpl *ContextVk::createFramebuffer(const gl::FramebufferState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 557 | { |
Jamie Madill | 7b57b9d | 2017-01-13 09:33:38 -0500 | [diff] [blame] | 558 | return FramebufferVk::CreateUserFBO(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 559 | } |
| 560 | |
| 561 | TextureImpl *ContextVk::createTexture(const gl::TextureState &state) |
| 562 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 563 | return new TextureVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 564 | } |
| 565 | |
| 566 | RenderbufferImpl *ContextVk::createRenderbuffer() |
| 567 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 568 | return new RenderbufferVk(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 569 | } |
| 570 | |
Jamie Madill | 8f77560 | 2016-11-03 16:45:34 -0400 | [diff] [blame] | 571 | BufferImpl *ContextVk::createBuffer(const gl::BufferState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 572 | { |
Jamie Madill | 8f77560 | 2016-11-03 16:45:34 -0400 | [diff] [blame] | 573 | return new BufferVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 574 | } |
| 575 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 576 | VertexArrayImpl *ContextVk::createVertexArray(const gl::VertexArrayState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 577 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 578 | return new VertexArrayVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 579 | } |
| 580 | |
| 581 | QueryImpl *ContextVk::createQuery(GLenum type) |
| 582 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 583 | return new QueryVk(type); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 584 | } |
| 585 | |
| 586 | FenceNVImpl *ContextVk::createFenceNV() |
| 587 | { |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame] | 588 | return new FenceNVVk(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 589 | } |
| 590 | |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 591 | SyncImpl *ContextVk::createSync() |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 592 | { |
Jamie Madill | 70b5bb0 | 2017-08-28 13:32:37 -0400 | [diff] [blame] | 593 | return new SyncVk(); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 594 | } |
| 595 | |
Geoff Lang | 73bd218 | 2016-07-15 13:01:24 -0400 | [diff] [blame] | 596 | TransformFeedbackImpl *ContextVk::createTransformFeedback(const gl::TransformFeedbackState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 597 | { |
Geoff Lang | 73bd218 | 2016-07-15 13:01:24 -0400 | [diff] [blame] | 598 | return new TransformFeedbackVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 599 | } |
| 600 | |
Jamie Madill | 06ef36b | 2017-09-09 23:32:46 -0400 | [diff] [blame] | 601 | SamplerImpl *ContextVk::createSampler(const gl::SamplerState &state) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 602 | { |
Jamie Madill | 06ef36b | 2017-09-09 23:32:46 -0400 | [diff] [blame] | 603 | return new SamplerVk(state); |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 604 | } |
| 605 | |
Yunchao He | a336b90 | 2017-08-02 16:05:21 +0800 | [diff] [blame] | 606 | ProgramPipelineImpl *ContextVk::createProgramPipeline(const gl::ProgramPipelineState &state) |
| 607 | { |
| 608 | return new ProgramPipelineVk(state); |
| 609 | } |
| 610 | |
Sami Väisänen | e45e53b | 2016-05-25 10:36:04 +0300 | [diff] [blame] | 611 | std::vector<PathImpl *> ContextVk::createPaths(GLsizei) |
| 612 | { |
| 613 | return std::vector<PathImpl *>(); |
| 614 | } |
| 615 | |
Jamie Madill | 7210656 | 2017-03-24 14:18:50 -0400 | [diff] [blame] | 616 | // TODO(jmadill): Use pipeline cache. |
| 617 | void ContextVk::invalidateCurrentPipeline() |
| 618 | { |
| 619 | mRenderer->enqueueGarbageOrDeleteNow(*this, mCurrentPipeline); |
| 620 | } |
| 621 | |
Jamie Madill | fe54834 | 2017-06-19 11:13:24 -0400 | [diff] [blame] | 622 | gl::Error ContextVk::dispatchCompute(const gl::Context *context, |
| 623 | GLuint numGroupsX, |
| 624 | GLuint numGroupsY, |
| 625 | GLuint numGroupsZ) |
Xinghua Cao | 2b39659 | 2017-03-29 15:36:04 +0800 | [diff] [blame] | 626 | { |
| 627 | UNIMPLEMENTED(); |
Yuly Novikov | c4d18aa | 2017-03-09 18:45:02 -0500 | [diff] [blame] | 628 | return gl::InternalError(); |
Xinghua Cao | 2b39659 | 2017-03-29 15:36:04 +0800 | [diff] [blame] | 629 | } |
| 630 | |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 631 | } // namespace rx |