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