blob: d68c3b5671aaf2c7adf65383fcd1179266ed49aa [file] [log] [blame]
Jamie Madill9e54b5a2016-05-25 12:57:39 -04001//
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 Madilldf68a6f2017-01-13 17:29:53 -050012#include "common/BitSetIterator.h"
Jamie Madill9e54b5a2016-05-25 12:57:39 -040013#include "common/debug.h"
Jamie Madilldf68a6f2017-01-13 17:29:53 -050014#include "libANGLE/Program.h"
Jamie Madillacccc6c2016-05-03 17:22:10 -040015#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"
20#include "libANGLE/renderer/vulkan/FenceSyncVk.h"
21#include "libANGLE/renderer/vulkan/FramebufferVk.h"
22#include "libANGLE/renderer/vulkan/ImageVk.h"
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"
29#include "libANGLE/renderer/vulkan/TextureVk.h"
30#include "libANGLE/renderer/vulkan/TransformFeedbackVk.h"
31#include "libANGLE/renderer/vulkan/VertexArrayVk.h"
Jamie Madilldf68a6f2017-01-13 17:29:53 -050032#include "libANGLE/renderer/vulkan/formatutilsvk.h"
Jamie Madill9e54b5a2016-05-25 12:57:39 -040033
34namespace rx
35{
36
Jamie Madillacccc6c2016-05-03 17:22:10 -040037ContextVk::ContextVk(const gl::ContextState &state, RendererVk *renderer)
38 : ContextImpl(state), mRenderer(renderer)
Jamie Madill9e54b5a2016-05-25 12:57:39 -040039{
40}
41
42ContextVk::~ContextVk()
43{
44}
45
46gl::Error ContextVk::initialize()
47{
Jamie Madille09bd5d2016-11-29 16:20:35 -050048 return gl::NoError();
Jamie Madill9e54b5a2016-05-25 12:57:39 -040049}
50
51gl::Error ContextVk::flush()
52{
53 UNIMPLEMENTED();
54 return gl::Error(GL_INVALID_OPERATION);
55}
56
57gl::Error ContextVk::finish()
58{
59 UNIMPLEMENTED();
60 return gl::Error(GL_INVALID_OPERATION);
61}
62
63gl::Error ContextVk::drawArrays(GLenum mode, GLint first, GLsizei count)
64{
Jamie Madilldf68a6f2017-01-13 17:29:53 -050065 VkDevice device = mRenderer->getDevice();
66 const auto &state = mState.getState();
67 const auto &programGL = state.getProgram();
68 const auto &vao = state.getVertexArray();
69 const auto &attribs = vao->getVertexAttributes();
70 const auto &programVk = GetImplAs<ProgramVk>(programGL);
71 const auto *drawFBO = state.getDrawFramebuffer();
72 FramebufferVk *vkFBO = GetImplAs<FramebufferVk>(drawFBO);
73
74 // { vertex, fragment }
75 VkPipelineShaderStageCreateInfo shaderStages[2];
76
77 shaderStages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
78 shaderStages[0].pNext = nullptr;
79 shaderStages[0].flags = 0;
80 shaderStages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
81 shaderStages[0].module = programVk->getLinkedVertexModule().getHandle();
82 shaderStages[0].pName = "main";
83 shaderStages[0].pSpecializationInfo = nullptr;
84
85 shaderStages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
86 shaderStages[1].pNext = nullptr;
87 shaderStages[1].flags = 0;
88 shaderStages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
89 shaderStages[1].module = programVk->getLinkedFragmentModule().getHandle();
90 shaderStages[1].pName = "main";
91 shaderStages[1].pSpecializationInfo = nullptr;
92
93 // Process vertex attributes
94 // TODO(jmadill): Caching with dirty bits.
95 std::vector<VkVertexInputBindingDescription> vertexBindings;
96 std::vector<VkVertexInputAttributeDescription> vertexAttribs;
97 std::vector<VkBuffer> vertexHandles;
98 std::vector<VkDeviceSize> vertexOffsets;
99
100 for (auto attribIndex : angle::IterateBitSet(programGL->getActiveAttribLocationsMask()))
101 {
102 const auto &attrib = attribs[attribIndex];
103 if (attrib.enabled)
104 {
105 VkVertexInputBindingDescription bindingDesc;
106 bindingDesc.binding = static_cast<uint32_t>(vertexBindings.size());
107 bindingDesc.stride = static_cast<uint32_t>(gl::ComputeVertexAttributeTypeSize(attrib));
108 bindingDesc.inputRate =
109 (attrib.divisor > 0 ? VK_VERTEX_INPUT_RATE_INSTANCE : VK_VERTEX_INPUT_RATE_VERTEX);
110
111 gl::VertexFormatType vertexFormatType = gl::GetVertexFormatType(attrib);
112
113 VkVertexInputAttributeDescription attribDesc;
114 attribDesc.binding = bindingDesc.binding;
115 attribDesc.format = vk::GetNativeVertexFormat(vertexFormatType);
116 attribDesc.location = static_cast<uint32_t>(attribIndex);
117 attribDesc.offset = static_cast<uint32_t>(attrib.offset);
118
119 vertexBindings.push_back(bindingDesc);
120 vertexAttribs.push_back(attribDesc);
121
122 // TODO(jmadill): Offset handling.
123 gl::Buffer *bufferGL = attrib.buffer.get();
124 ASSERT(bufferGL);
125 BufferVk *bufferVk = GetImplAs<BufferVk>(bufferGL);
126 vertexHandles.push_back(bufferVk->getVkBuffer().getHandle());
127 vertexOffsets.push_back(0);
128 }
129 else
130 {
131 UNIMPLEMENTED();
132 }
133 }
134
135 // TODO(jmadill): Validate with ASSERT against physical device limits/caps?
136 VkPipelineVertexInputStateCreateInfo vertexInputState;
137 vertexInputState.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
138 vertexInputState.pNext = nullptr;
139 vertexInputState.flags = 0;
140 vertexInputState.vertexBindingDescriptionCount = static_cast<uint32_t>(vertexBindings.size());
141 vertexInputState.pVertexBindingDescriptions = vertexBindings.data();
142 vertexInputState.vertexAttributeDescriptionCount = static_cast<uint32_t>(vertexAttribs.size());
143 vertexInputState.pVertexAttributeDescriptions = vertexAttribs.data();
144
145 VkPipelineInputAssemblyStateCreateInfo inputAssemblyState;
146 inputAssemblyState.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
147 inputAssemblyState.pNext = nullptr;
148 inputAssemblyState.flags = 0;
149 inputAssemblyState.topology = gl_vk::GetPrimitiveTopology(mode);
150 inputAssemblyState.primitiveRestartEnable = VK_FALSE;
151
152 const gl::Rectangle &viewportGL = state.getViewport();
153 VkViewport viewportVk;
154 viewportVk.x = static_cast<float>(viewportGL.x);
155 viewportVk.y = static_cast<float>(viewportGL.y);
156 viewportVk.width = static_cast<float>(viewportGL.width);
157 viewportVk.height = static_cast<float>(viewportGL.height);
158 viewportVk.minDepth = state.getNearPlane();
159 viewportVk.maxDepth = state.getFarPlane();
160
161 // TODO(jmadill): Scissor.
162 VkRect2D scissorVk;
163 scissorVk.offset.x = viewportGL.x;
164 scissorVk.offset.y = viewportGL.y;
165 scissorVk.extent.width = viewportGL.width;
166 scissorVk.extent.height = viewportGL.height;
167
168 VkPipelineViewportStateCreateInfo viewportState;
169 viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
170 viewportState.pNext = nullptr;
171 viewportState.flags = 0;
172 viewportState.viewportCount = 1;
173 viewportState.pViewports = &viewportVk;
174 viewportState.scissorCount = 1;
175 viewportState.pScissors = &scissorVk;
176
177 // TODO(jmadill): Extra rasterizer state features.
178 VkPipelineRasterizationStateCreateInfo rasterState;
179 rasterState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
180 rasterState.pNext = nullptr;
181 rasterState.flags = 0;
182 rasterState.depthClampEnable = VK_FALSE;
183 rasterState.rasterizerDiscardEnable = VK_FALSE;
184 rasterState.polygonMode = VK_POLYGON_MODE_FILL;
185 rasterState.cullMode = gl_vk::GetCullMode(state.getRasterizerState());
186 rasterState.frontFace = gl_vk::GetFrontFace(state.getRasterizerState().frontFace);
187 rasterState.depthBiasEnable = VK_FALSE;
188 rasterState.depthBiasConstantFactor = 0.0f;
189 rasterState.depthBiasClamp = 0.0f;
190 rasterState.depthBiasSlopeFactor = 0.0f;
191 rasterState.lineWidth = state.getLineWidth();
192
193 // TODO(jmadill): Multisample state.
194 VkPipelineMultisampleStateCreateInfo multisampleState;
195 multisampleState.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
196 multisampleState.pNext = nullptr;
197 multisampleState.flags = 0;
198 multisampleState.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
199 multisampleState.sampleShadingEnable = VK_FALSE;
200 multisampleState.minSampleShading = 0.0f;
201 multisampleState.pSampleMask = nullptr;
202 multisampleState.alphaToCoverageEnable = VK_FALSE;
203 multisampleState.alphaToOneEnable = VK_FALSE;
204
205 // TODO(jmadill): Depth/stencil state.
206
207 // TODO(jmadill): Blend state/MRT.
208 VkPipelineColorBlendAttachmentState blendAttachmentState;
209 blendAttachmentState.blendEnable = VK_FALSE;
210 blendAttachmentState.srcColorBlendFactor = VK_BLEND_FACTOR_ONE;
211 blendAttachmentState.dstColorBlendFactor = VK_BLEND_FACTOR_ONE;
212 blendAttachmentState.colorBlendOp = VK_BLEND_OP_ADD;
213 blendAttachmentState.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
214 blendAttachmentState.dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
215 blendAttachmentState.alphaBlendOp = VK_BLEND_OP_ADD;
216 blendAttachmentState.colorWriteMask = (VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT |
217 VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT);
218
219 VkPipelineColorBlendStateCreateInfo blendState;
220 blendState.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
221 blendState.pNext = 0;
222 blendState.flags = 0;
223 blendState.logicOpEnable = VK_FALSE;
224 blendState.logicOp = VK_LOGIC_OP_CLEAR;
225 blendState.attachmentCount = 1;
226 blendState.pAttachments = &blendAttachmentState;
227 blendState.blendConstants[0] = 0.0f;
228 blendState.blendConstants[1] = 0.0f;
229 blendState.blendConstants[2] = 0.0f;
230 blendState.blendConstants[3] = 0.0f;
231
232 // TODO(jmadill): Dynamic state.
233 vk::RenderPass *renderPass = nullptr;
234 ANGLE_TRY_RESULT(vkFBO->getRenderPass(device), renderPass);
235 ASSERT(renderPass && renderPass->valid());
236
237 vk::PipelineLayout *pipelineLayout = nullptr;
238 ANGLE_TRY_RESULT(programVk->getPipelineLayout(device), pipelineLayout);
239 ASSERT(pipelineLayout && pipelineLayout->valid());
240
241 VkGraphicsPipelineCreateInfo pipelineInfo;
242 pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
243 pipelineInfo.pNext = nullptr;
244 pipelineInfo.flags = 0;
245 pipelineInfo.stageCount = 2;
246 pipelineInfo.pStages = shaderStages;
247 pipelineInfo.pVertexInputState = &vertexInputState;
248 pipelineInfo.pInputAssemblyState = &inputAssemblyState;
249 pipelineInfo.pTessellationState = nullptr;
250 pipelineInfo.pViewportState = &viewportState;
251 pipelineInfo.pRasterizationState = &rasterState;
252 pipelineInfo.pMultisampleState = &multisampleState;
253 pipelineInfo.pDepthStencilState = nullptr;
254 pipelineInfo.pColorBlendState = &blendState;
255 pipelineInfo.pDynamicState = nullptr;
256 pipelineInfo.layout = pipelineLayout->getHandle();
257 pipelineInfo.renderPass = renderPass->getHandle();
258 pipelineInfo.subpass = 0;
259 pipelineInfo.basePipelineHandle = VK_NULL_HANDLE;
260 pipelineInfo.basePipelineIndex = 0;
261
262 vk::Pipeline newPipeline(device);
263 ANGLE_TRY(newPipeline.initGraphics(pipelineInfo));
264
265 mCurrentPipeline = std::move(newPipeline);
266
267 vk::CommandBuffer *commandBuffer = mRenderer->getCommandBuffer();
268 ANGLE_TRY(vkFBO->beginRenderPass(device, commandBuffer, state));
269
270 commandBuffer->bindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, mCurrentPipeline);
271 commandBuffer->bindVertexBuffers(0, vertexHandles, vertexOffsets);
272 commandBuffer->draw(count, 1, first, 0);
273 commandBuffer->endRenderPass();
274 ANGLE_TRY(commandBuffer->end());
275
276 ANGLE_TRY(mRenderer->submitAndFinishCommandBuffer(*commandBuffer));
277
278 return gl::NoError();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400279}
280
281gl::Error ContextVk::drawArraysInstanced(GLenum mode,
282 GLint first,
283 GLsizei count,
284 GLsizei instanceCount)
285{
286 UNIMPLEMENTED();
287 return gl::Error(GL_INVALID_OPERATION);
288}
289
290gl::Error ContextVk::drawElements(GLenum mode,
291 GLsizei count,
292 GLenum type,
293 const GLvoid *indices,
294 const gl::IndexRange &indexRange)
295{
296 UNIMPLEMENTED();
297 return gl::Error(GL_INVALID_OPERATION);
298}
299
300gl::Error ContextVk::drawElementsInstanced(GLenum mode,
301 GLsizei count,
302 GLenum type,
303 const GLvoid *indices,
304 GLsizei instances,
305 const gl::IndexRange &indexRange)
306{
307 UNIMPLEMENTED();
308 return gl::Error(GL_INVALID_OPERATION);
309}
310
311gl::Error ContextVk::drawRangeElements(GLenum mode,
312 GLuint start,
313 GLuint end,
314 GLsizei count,
315 GLenum type,
316 const GLvoid *indices,
317 const gl::IndexRange &indexRange)
318{
Jamie Madill7b57b9d2017-01-13 09:33:38 -0500319 return gl::NoError();
320}
321
322VkDevice ContextVk::getDevice() const
323{
324 return mRenderer->getDevice();
325}
326
327vk::CommandBuffer *ContextVk::getCommandBuffer()
328{
329 return mRenderer->getCommandBuffer();
330}
331
332vk::Error ContextVk::submitCommands(const vk::CommandBuffer &commandBuffer)
333{
334 // TODO(jmadill): Command queuing.
335 ANGLE_TRY(mRenderer->submitAndFinishCommandBuffer(commandBuffer));
336 return vk::NoError();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400337}
338
Jiajia Qind9671222016-11-29 16:30:31 +0800339gl::Error ContextVk::drawArraysIndirect(GLenum mode, const GLvoid *indirect)
340{
341 UNIMPLEMENTED();
342 return gl::InternalError() << "DrawArraysIndirect hasn't been implemented for vulkan backend.";
343}
344
345gl::Error ContextVk::drawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect)
346{
347 UNIMPLEMENTED();
348 return gl::InternalError()
349 << "DrawElementsIndirect hasn't been implemented for vulkan backend.";
350}
351
Corentin Wallez87fbe1c2016-08-03 14:41:42 -0400352GLenum ContextVk::getResetStatus()
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400353{
354 UNIMPLEMENTED();
Corentin Wallez87fbe1c2016-08-03 14:41:42 -0400355 return GL_NO_ERROR;
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400356}
357
358std::string ContextVk::getVendorString() const
359{
360 UNIMPLEMENTED();
361 return std::string();
362}
363
364std::string ContextVk::getRendererDescription() const
365{
Jamie Madille09bd5d2016-11-29 16:20:35 -0500366 return mRenderer->getRendererDescription();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400367}
368
369void ContextVk::insertEventMarker(GLsizei length, const char *marker)
370{
371 UNIMPLEMENTED();
372}
373
374void ContextVk::pushGroupMarker(GLsizei length, const char *marker)
375{
376 UNIMPLEMENTED();
377}
378
379void ContextVk::popGroupMarker()
380{
381 UNIMPLEMENTED();
382}
383
Jamie Madill7b57b9d2017-01-13 09:33:38 -0500384void ContextVk::syncState(const gl::State & /*state*/, const gl::State::DirtyBits & /*dirtyBits*/)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400385{
Jamie Madill7b57b9d2017-01-13 09:33:38 -0500386 // TODO(jmadill): Vulkan dirty bits.
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400387}
388
389GLint ContextVk::getGPUDisjoint()
390{
391 UNIMPLEMENTED();
392 return GLint();
393}
394
395GLint64 ContextVk::getTimestamp()
396{
397 UNIMPLEMENTED();
398 return GLint64();
399}
400
Jamie Madille09bd5d2016-11-29 16:20:35 -0500401void ContextVk::onMakeCurrent(const gl::ContextState & /*data*/)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400402{
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400403}
404
405const gl::Caps &ContextVk::getNativeCaps() const
406{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400407 return mRenderer->getNativeCaps();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400408}
409
410const gl::TextureCapsMap &ContextVk::getNativeTextureCaps() const
411{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400412 return mRenderer->getNativeTextureCaps();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400413}
414
415const gl::Extensions &ContextVk::getNativeExtensions() const
416{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400417 return mRenderer->getNativeExtensions();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400418}
419
420const gl::Limitations &ContextVk::getNativeLimitations() const
421{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400422 return mRenderer->getNativeLimitations();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400423}
424
425CompilerImpl *ContextVk::createCompiler()
426{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400427 return new CompilerVk();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400428}
429
Jamie Madillacccc6c2016-05-03 17:22:10 -0400430ShaderImpl *ContextVk::createShader(const gl::ShaderState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400431{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400432 return new ShaderVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400433}
434
Jamie Madillacccc6c2016-05-03 17:22:10 -0400435ProgramImpl *ContextVk::createProgram(const gl::ProgramState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400436{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400437 return new ProgramVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400438}
439
Jamie Madillacccc6c2016-05-03 17:22:10 -0400440FramebufferImpl *ContextVk::createFramebuffer(const gl::FramebufferState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400441{
Jamie Madill7b57b9d2017-01-13 09:33:38 -0500442 return FramebufferVk::CreateUserFBO(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400443}
444
445TextureImpl *ContextVk::createTexture(const gl::TextureState &state)
446{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400447 return new TextureVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400448}
449
450RenderbufferImpl *ContextVk::createRenderbuffer()
451{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400452 return new RenderbufferVk();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400453}
454
Jamie Madill8f775602016-11-03 16:45:34 -0400455BufferImpl *ContextVk::createBuffer(const gl::BufferState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400456{
Jamie Madill8f775602016-11-03 16:45:34 -0400457 return new BufferVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400458}
459
Jamie Madillacccc6c2016-05-03 17:22:10 -0400460VertexArrayImpl *ContextVk::createVertexArray(const gl::VertexArrayState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400461{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400462 return new VertexArrayVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400463}
464
465QueryImpl *ContextVk::createQuery(GLenum type)
466{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400467 return new QueryVk(type);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400468}
469
470FenceNVImpl *ContextVk::createFenceNV()
471{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400472 return new FenceNVVk();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400473}
474
475FenceSyncImpl *ContextVk::createFenceSync()
476{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400477 return new FenceSyncVk();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400478}
479
Geoff Lang73bd2182016-07-15 13:01:24 -0400480TransformFeedbackImpl *ContextVk::createTransformFeedback(const gl::TransformFeedbackState &state)
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400481{
Geoff Lang73bd2182016-07-15 13:01:24 -0400482 return new TransformFeedbackVk(state);
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400483}
484
485SamplerImpl *ContextVk::createSampler()
486{
Jamie Madillacccc6c2016-05-03 17:22:10 -0400487 return new SamplerVk();
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400488}
489
Sami Väisänene45e53b2016-05-25 10:36:04 +0300490std::vector<PathImpl *> ContextVk::createPaths(GLsizei)
491{
492 return std::vector<PathImpl *>();
493}
494
Jamie Madill9e54b5a2016-05-25 12:57:39 -0400495} // namespace rx