blob: 00c15e4bf0c8466ed7aef73ce837b0eb3a37f30c [file] [log] [blame]
daniel@transgaming.com621ce052012-10-31 17:52:29 +00001//
Geoff Langeeba6e12014-02-03 13:12:30 -05002// Copyright (c) 2012-2014 The ANGLE Project Authors. All rights reserved.
daniel@transgaming.com621ce052012-10-31 17:52:29 +00003// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// Renderer.h: Defines a back-end specific class that hides the details of the
8// implementation-specific renderer.
9
10#ifndef LIBGLESV2_RENDERER_RENDERER_H_
11#define LIBGLESV2_RENDERER_RENDERER_H_
12
daniel@transgaming.comab1c1462012-12-20 21:08:30 +000013#include "libGLESv2/Uniform.h"
daniel@transgaming.comef19da52012-11-28 19:35:08 +000014#include "libGLESv2/angletypes.h"
Geoff Langcec35902014-04-16 10:52:36 -040015#include "libGLESv2/Caps.h"
daniel@transgaming.come4733d72012-10-31 18:07:01 +000016
Geoff Lang268b6bc2014-07-09 16:22:55 -040017#include <cstdint>
18
shannonwoods@chromium.orgf97a0842013-05-30 00:10:33 +000019#if !defined(ANGLE_COMPILE_OPTIMIZATION_LEVEL)
Nicolas Capens655fe362014-04-11 13:12:34 -040020// WARNING: D3DCOMPILE_OPTIMIZATION_LEVEL3 may lead to a DX9 shader compiler hang.
21// It should only be used selectively to work around specific bugs.
22#define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL1
shannonwoods@chromium.orgf97a0842013-05-30 00:10:33 +000023#endif
24
daniel@transgaming.comef21ab22012-10-31 17:52:47 +000025namespace egl
26{
27class Display;
28}
29
daniel@transgaming.com83e80ee2012-11-28 19:40:53 +000030namespace gl
31{
daniel@transgaming.coma9c71422012-11-28 20:58:45 +000032class InfoLog;
daniel@transgaming.com83e80ee2012-11-28 19:40:53 +000033class ProgramBinary;
Geoff Lang48dcae72014-02-05 16:28:24 -050034struct LinkedVarying;
Brandon Jones5bf98292014-06-06 17:19:38 -070035struct VertexAttribute;
daniel@transgaming.com91207b72012-11-28 20:56:43 +000036class Buffer;
shannon.woods@transgaming.comd2811d62013-02-28 23:11:19 +000037class Texture;
38class Framebuffer;
Jamie Madilla857c362013-07-02 11:57:02 -040039struct VertexAttribCurrentValueData;
daniel@transgaming.com83e80ee2012-11-28 19:40:53 +000040}
41
daniel@transgaming.com31b13e12012-11-28 19:34:30 +000042namespace rx
daniel@transgaming.com1d80eee2012-11-28 19:33:31 +000043{
daniel@transgaming.com87705f82012-12-20 21:10:45 +000044class TextureStorageInterface2D;
45class TextureStorageInterfaceCube;
shannon.woods%transgaming.com@gtempaccount.com414e82a2013-04-13 03:44:05 +000046class TextureStorageInterface3D;
shannon.woods%transgaming.com@gtempaccount.com6c86bd52013-04-13 03:45:45 +000047class TextureStorageInterface2DArray;
daniel@transgaming.com3f255b42012-12-20 21:07:35 +000048class VertexBuffer;
daniel@transgaming.com0b6d7742012-12-20 21:09:47 +000049class IndexBuffer;
shannon.woods@transgaming.com50df6c52013-02-28 23:02:49 +000050class QueryImpl;
shannon.woods@transgaming.comcfe787e2013-02-28 23:03:35 +000051class FenceImpl;
Brandon Jonesd38f9262014-06-18 16:26:45 -070052class BufferImpl;
Brandon Jones5bf98292014-06-06 17:19:38 -070053class VertexArrayImpl;
shannon.woods@transgaming.com4e52b632013-02-28 23:08:01 +000054class BufferStorage;
daniel@transgaming.com31240482012-11-28 21:06:41 +000055struct TranslatedIndexData;
Brandon Jonesf05cdee2014-08-27 15:24:07 -070056class ShaderImpl;
shannon.woods@transgaming.comd2811d62013-02-28 23:11:19 +000057class ShaderExecutable;
58class SwapChain;
59class RenderTarget;
60class Image;
61class TextureStorage;
Jamie Madill8ff21ae2014-02-04 16:04:05 -050062class UniformStorage;
Brandon Jones6053a522014-07-25 16:22:09 -070063class TextureImpl;
Kenneth Russelldb8ae162014-08-25 19:02:35 -070064class TransformFeedbackImpl;
Brandon Jonesf47bebc2014-07-09 14:28:42 -070065
daniel@transgaming.com3281f972012-10-31 18:38:51 +000066struct ConfigDesc
67{
68 GLenum renderTargetFormat;
69 GLenum depthStencilFormat;
70 GLint multiSample;
71 bool fastConfig;
shannon.woods%transgaming.com@gtempaccount.comdcf33d52013-04-13 03:33:11 +000072 bool es3Capable;
daniel@transgaming.com3281f972012-10-31 18:38:51 +000073};
74
daniel@transgaming.coma390e1e2013-01-11 04:09:39 +000075struct dx_VertexConstants
76{
77 float depthRange[4];
shannon.woods@transgaming.com42832a62013-02-28 23:18:38 +000078 float viewAdjust[4];
daniel@transgaming.coma390e1e2013-01-11 04:09:39 +000079};
80
81struct dx_PixelConstants
82{
83 float depthRange[4];
shannon.woods@transgaming.coma14ecf32013-02-28 23:09:42 +000084 float viewCoords[4];
daniel@transgaming.coma390e1e2013-01-11 04:09:39 +000085 float depthFront[4];
86};
87
shannon.woods@transgaming.com69ff7762013-01-25 21:55:24 +000088enum ShaderType
89{
90 SHADER_VERTEX,
shannon.woods@transgaming.com3e773bb2013-01-25 21:55:47 +000091 SHADER_PIXEL,
92 SHADER_GEOMETRY
shannon.woods@transgaming.com69ff7762013-01-25 21:55:24 +000093};
94
daniel@transgaming.com621ce052012-10-31 17:52:29 +000095class Renderer
96{
97 public:
daniel@transgaming.com25e16af2012-11-28 21:05:57 +000098 explicit Renderer(egl::Display *display);
Jamie Madillbde4c2f2014-03-21 10:42:10 -040099 virtual ~Renderer();
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000100
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000101 virtual EGLint initialize() = 0;
102 virtual bool resetDevice() = 0;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000103
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000104 virtual int generateConfigs(ConfigDesc **configDescList) = 0;
105 virtual void deleteConfigs(ConfigDesc *configDescList) = 0;
daniel@transgaming.com3281f972012-10-31 18:38:51 +0000106
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000107 virtual void sync(bool block) = 0;
daniel@transgaming.comef21ab22012-10-31 17:52:47 +0000108
daniel@transgaming.comb9bb2792012-11-28 19:36:49 +0000109 virtual SwapChain *createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0;
110
Geoff Lange2e0ce02013-09-17 17:05:08 -0400111 virtual void generateSwizzle(gl::Texture *texture) = 0;
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000112 virtual void setSamplerState(gl::SamplerType type, int index, const gl::SamplerState &sampler) = 0;
113 virtual void setTexture(gl::SamplerType type, int index, gl::Texture *texture) = 0;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000114
shannonwoods@chromium.org1bddfb92013-05-30 00:11:29 +0000115 virtual bool setUniformBuffers(const gl::Buffer *vertexUniformBuffers[], const gl::Buffer *fragmentUniformBuffers[]) = 0;
116
daniel@transgaming.com237bc7e2012-11-28 21:01:06 +0000117 virtual void setRasterizerState(const gl::RasterizerState &rasterState) = 0;
Geoff Langc142e9d2013-09-30 15:19:47 -0400118 virtual void setBlendState(gl::Framebuffer *framebuffer, const gl::BlendState &blendState, const gl::ColorF &blendColor,
daniel@transgaming.com493d4f82012-11-28 19:35:45 +0000119 unsigned int sampleMask) = 0;
daniel@transgaming.com08c331d2012-11-28 19:38:39 +0000120 virtual void setDepthStencilState(const gl::DepthStencilState &depthStencilState, int stencilRef,
daniel@transgaming.com3a0ef482012-11-28 21:01:20 +0000121 int stencilBackRef, bool frontFaceCCW) = 0;
daniel@transgaming.com493d4f82012-11-28 19:35:45 +0000122
daniel@transgaming.comd55e8c12012-11-28 21:07:02 +0000123 virtual void setScissorRectangle(const gl::Rectangle &scissor, bool enabled) = 0;
daniel@transgaming.com12985182012-12-20 20:56:31 +0000124 virtual bool setViewport(const gl::Rectangle &viewport, float zNear, float zFar, GLenum drawMode, GLenum frontFace,
shannon.woods@transgaming.com0b236e22013-01-25 21:57:07 +0000125 bool ignoreViewport) = 0;
daniel@transgaming.com493d4f82012-11-28 19:35:45 +0000126
daniel@transgaming.comae39ee22012-11-28 19:42:02 +0000127 virtual bool applyRenderTarget(gl::Framebuffer *frameBuffer) = 0;
Geoff Lang04fb89a2014-06-09 15:05:36 -0400128 virtual void applyShaders(gl::ProgramBinary *programBinary, const gl::VertexFormat inputLayout[], const gl::Framebuffer *framebuffer,
129 bool rasterizerDiscard, bool transformFeedbackActive) = 0;
Jamie Madill8ff21ae2014-02-04 16:04:05 -0500130 virtual void applyUniforms(const gl::ProgramBinary &programBinary) = 0;
daniel@transgaming.com91207b72012-11-28 20:56:43 +0000131 virtual bool applyPrimitiveType(GLenum primitiveType, GLsizei elementCount) = 0;
Shannon Woods53a94a82014-06-24 15:20:36 -0400132 virtual GLenum applyVertexBuffer(gl::ProgramBinary *programBinary, const gl::VertexAttribute vertexAttributes[], const gl::VertexAttribCurrentValueData currentValues[],
Jamie Madilla857c362013-07-02 11:57:02 -0400133 GLint first, GLsizei count, GLsizei instances) = 0;
daniel@transgaming.com31240482012-11-28 21:06:41 +0000134 virtual GLenum applyIndexBuffer(const GLvoid *indices, gl::Buffer *elementArrayBuffer, GLsizei count, GLenum mode, GLenum type, TranslatedIndexData *indexInfo) = 0;
Geoff Langeeba6e12014-02-03 13:12:30 -0500135 virtual void applyTransformFeedbackBuffers(gl::Buffer *transformFeedbackBuffers[], GLintptr offsets[]) = 0;
daniel@transgaming.com493d4f82012-11-28 19:35:45 +0000136
Geoff Lang4c5c6bb2014-02-05 16:32:46 -0500137 virtual void drawArrays(GLenum mode, GLsizei count, GLsizei instances, bool transformFeedbackActive) = 0;
138 virtual void drawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices,
139 gl::Buffer *elementArrayBuffer, const TranslatedIndexData &indexInfo, GLsizei instances) = 0;
daniel@transgaming.com67094ee2012-11-28 20:53:04 +0000140
daniel@transgaming.com084a2572012-11-28 20:55:17 +0000141 virtual void clear(const gl::ClearParameters &clearParams, gl::Framebuffer *frameBuffer) = 0;
daniel@transgaming.comd084c622012-11-28 19:36:05 +0000142
daniel@transgaming.comc43a6052012-11-28 19:41:51 +0000143 virtual void markAllStateDirty() = 0;
144
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000145 // lost device
shannon.woods@transgaming.comeb049e22013-02-28 23:04:49 +0000146 virtual void notifyDeviceLost() = 0;
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000147 virtual bool isDeviceLost() = 0;
148 virtual bool testDeviceLost(bool notify) = 0;
149 virtual bool testDeviceResettable() = 0;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000150
Geoff Langcec35902014-04-16 10:52:36 -0400151 // Renderer capabilities (virtual because it is used by egl::Display, do not override)
Geoff Langc0b9ef42014-07-02 10:02:37 -0400152 virtual const gl::Caps &getRendererCaps() const;
153 virtual const gl::TextureCapsMap &getRendererTextureCaps() const;
154 virtual const gl::Extensions &getRendererExtensions() const;
Geoff Langcec35902014-04-16 10:52:36 -0400155
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000156 virtual DWORD getAdapterVendor() const = 0;
daniel@transgaming.comca1ac1f2013-01-11 04:13:05 +0000157 virtual std::string getRendererDescription() const = 0;
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000158 virtual GUID getAdapterIdentifier() const = 0;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000159
shannon.woods@transgaming.com76cd88c2013-01-25 21:54:36 +0000160 virtual unsigned int getMaxCombinedTextureImageUnits() const = 0;
shannon.woods@transgaming.comd8136cb2013-02-28 23:14:44 +0000161 virtual unsigned int getReservedVertexUniformVectors() const = 0;
162 virtual unsigned int getReservedFragmentUniformVectors() const = 0;
shannon.woods@transgaming.comd8136cb2013-02-28 23:14:44 +0000163 virtual unsigned int getMaxVaryingVectors() const = 0;
shannonwoods@chromium.org2b544222013-05-30 00:11:12 +0000164 virtual unsigned int getReservedVertexUniformBuffers() const = 0;
165 virtual unsigned int getReservedFragmentUniformBuffers() const = 0;
shannon.woods%transgaming.com@gtempaccount.com3f72ce32013-04-13 03:36:43 +0000166 virtual unsigned int getMaxTransformFeedbackBuffers() const = 0;
Geoff Lang1b6edcb2014-02-03 14:27:56 -0500167 virtual unsigned int getMaxTransformFeedbackSeparateComponents() const = 0;
168 virtual unsigned int getMaxTransformFeedbackInterleavedComponents() const = 0;
shannonwoods@chromium.org33e798f2013-05-30 00:05:05 +0000169 virtual unsigned int getMaxUniformBufferSize() const = 0;
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000170 virtual bool getShareHandleSupport() const = 0;
shannon.woods@transgaming.com8d2f0862013-02-28 23:09:19 +0000171 virtual bool getPostSubBufferSupport() const = 0;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000172
daniel@transgaming.com9549bea2012-11-28 20:57:23 +0000173 virtual int getMajorShaderModel() const = 0;
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000174 virtual int getMinSwapInterval() const = 0;
175 virtual int getMaxSwapInterval() const = 0;
daniel@transgaming.com5f4c1362012-10-31 18:29:00 +0000176
daniel@transgaming.coma9c71422012-11-28 20:58:45 +0000177 // Pixel operations
daniel@transgaming.com87705f82012-12-20 21:10:45 +0000178 virtual bool copyToRenderTarget(TextureStorageInterface2D *dest, TextureStorageInterface2D *source) = 0;
179 virtual bool copyToRenderTarget(TextureStorageInterfaceCube *dest, TextureStorageInterfaceCube *source) = 0;
shannon.woods%transgaming.com@gtempaccount.com414e82a2013-04-13 03:44:05 +0000180 virtual bool copyToRenderTarget(TextureStorageInterface3D *dest, TextureStorageInterface3D *source) = 0;
shannon.woods%transgaming.com@gtempaccount.com6c86bd52013-04-13 03:45:45 +0000181 virtual bool copyToRenderTarget(TextureStorageInterface2DArray *dest, TextureStorageInterface2DArray *source) = 0;
daniel@transgaming.com1d80eee2012-11-28 19:33:31 +0000182
shannon.woods@transgaming.com664916b2013-01-25 21:50:32 +0000183 virtual bool copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
daniel@transgaming.com87705f82012-12-20 21:10:45 +0000184 GLint xoffset, GLint yoffset, TextureStorageInterface2D *storage, GLint level) = 0;
shannon.woods@transgaming.com664916b2013-01-25 21:50:32 +0000185 virtual bool copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
daniel@transgaming.com87705f82012-12-20 21:10:45 +0000186 GLint xoffset, GLint yoffset, TextureStorageInterfaceCube *storage, GLenum target, GLint level) = 0;
shannon.woods%transgaming.com@gtempaccount.com414e82a2013-04-13 03:44:05 +0000187 virtual bool copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
188 GLint xoffset, GLint yoffset, GLint zOffset, TextureStorageInterface3D *storage, GLint level) = 0;
shannon.woods%transgaming.com@gtempaccount.com6c86bd52013-04-13 03:45:45 +0000189 virtual bool copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
190 GLint xoffset, GLint yoffset, GLint zOffset, TextureStorageInterface2DArray *storage, GLint level) = 0;
daniel@transgaming.comde8a7ff2012-11-28 19:34:13 +0000191
shannon.woods@transgaming.comea4a0c62013-02-28 23:06:29 +0000192 virtual bool blitRect(gl::Framebuffer *readTarget, const gl::Rectangle &readRect, gl::Framebuffer *drawTarget, const gl::Rectangle &drawRect,
Geoff Lang125deab2013-08-09 13:34:16 -0400193 const gl::Rectangle *scissor, bool blitRenderTarget, bool blitDepth, bool blitStencil, GLenum filter) = 0;
Jamie Madilleb9baab2014-03-24 13:19:43 -0400194 virtual void readPixels(gl::Framebuffer *framebuffer, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
Geoff Lang268b6bc2014-07-09 16:22:55 -0400195 GLenum type, GLuint outputPitch, const gl::PixelPackState &pack, uint8_t *pixels) = 0;
daniel@transgaming.com6c872172012-11-28 19:39:33 +0000196
daniel@transgaming.coma9c71422012-11-28 20:58:45 +0000197 // RenderTarget creation
daniel@transgaming.comf2423652012-11-28 20:53:50 +0000198 virtual RenderTarget *createRenderTarget(SwapChain *swapChain, bool depth) = 0;
Geoff Langa2d97f12013-06-11 11:44:02 -0400199 virtual RenderTarget *createRenderTarget(int width, int height, GLenum format, GLsizei samples) = 0;
daniel@transgaming.comf2423652012-11-28 20:53:50 +0000200
Brandon Jonesf05cdee2014-08-27 15:24:07 -0700201 // Shader creation
202 virtual ShaderImpl *createShader(GLenum type) = 0;
203
daniel@transgaming.coma9c71422012-11-28 20:58:45 +0000204 // Shader operations
Brandon Jonesf05cdee2014-08-27 15:24:07 -0700205 virtual void releaseShaderCompiler() = 0;
Geoff Lang48dcae72014-02-05 16:28:24 -0500206 virtual ShaderExecutable *loadExecutable(const void *function, size_t length, rx::ShaderType type,
207 const std::vector<gl::LinkedVarying> &transformFeedbackVaryings,
208 bool separatedOutputBuffers) = 0;
209 virtual ShaderExecutable *compileToExecutable(gl::InfoLog &infoLog, const char *shaderHLSL, rx::ShaderType type,
210 const std::vector<gl::LinkedVarying> &transformFeedbackVaryings,
211 bool separatedOutputBuffers, D3DWorkaroundType workaround) = 0;
Jamie Madill8ff21ae2014-02-04 16:04:05 -0500212 virtual UniformStorage *createUniformStorage(size_t storageSize) = 0;
daniel@transgaming.coma9c71422012-11-28 20:58:45 +0000213
daniel@transgaming.comf721fdb2012-12-20 20:53:11 +0000214 // Image operations
daniel@transgaming.com244e1832012-12-20 20:52:35 +0000215 virtual Image *createImage() = 0;
daniel@transgaming.comf721fdb2012-12-20 20:53:11 +0000216 virtual void generateMipmap(Image *dest, Image *source) = 0;
daniel@transgaming.com413d2712012-12-20 21:11:04 +0000217 virtual TextureStorage *createTextureStorage2D(SwapChain *swapChain) = 0;
Nicolas Capensbf712d02014-03-31 14:23:35 -0400218 virtual TextureStorage *createTextureStorage2D(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, int levels) = 0;
219 virtual TextureStorage *createTextureStorageCube(GLenum internalformat, bool renderTarget, int size, int levels) = 0;
220 virtual TextureStorage *createTextureStorage3D(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, GLsizei depth, int levels) = 0;
221 virtual TextureStorage *createTextureStorage2DArray(GLenum internalformat, bool renderTarget, GLsizei width, GLsizei height, GLsizei depth, int levels) = 0;
daniel@transgaming.com244e1832012-12-20 20:52:35 +0000222
Brandon Jonesf47bebc2014-07-09 14:28:42 -0700223 // Texture creation
Brandon Jones6053a522014-07-25 16:22:09 -0700224 virtual TextureImpl *createTexture(GLenum target) = 0;
Brandon Jonesf47bebc2014-07-09 14:28:42 -0700225
daniel@transgaming.com3f255b42012-12-20 21:07:35 +0000226 // Buffer creation
Brandon Jonesd38f9262014-06-18 16:26:45 -0700227 virtual BufferImpl *createBuffer() = 0;
daniel@transgaming.com3f255b42012-12-20 21:07:35 +0000228 virtual VertexBuffer *createVertexBuffer() = 0;
daniel@transgaming.com0b6d7742012-12-20 21:09:47 +0000229 virtual IndexBuffer *createIndexBuffer() = 0;
daniel@transgaming.com3f255b42012-12-20 21:07:35 +0000230
Brandon Jones5bf98292014-06-06 17:19:38 -0700231 // Vertex Array creation
232 virtual VertexArrayImpl *createVertexArray() = 0;
233
shannon.woods@transgaming.comcfe787e2013-02-28 23:03:35 +0000234 // Query and Fence creation
shannon.woods@transgaming.com50df6c52013-02-28 23:02:49 +0000235 virtual QueryImpl *createQuery(GLenum type) = 0;
shannon.woods@transgaming.comcfe787e2013-02-28 23:03:35 +0000236 virtual FenceImpl *createFence() = 0;
shannon.woods@transgaming.com50df6c52013-02-28 23:02:49 +0000237
Kenneth Russelldb8ae162014-08-25 19:02:35 -0700238 // Transform Feedback creation
239 virtual TransformFeedbackImpl* createTransformFeedback() = 0;
240
shannon.woods%transgaming.com@gtempaccount.com785f1962013-04-13 03:34:45 +0000241 // Current GLES client version
242 void setCurrentClientVersion(int clientVersion) { mCurrentClientVersion = clientVersion; }
243 int getCurrentClientVersion() const { return mCurrentClientVersion; }
244
Jamie Madilla21eea32013-09-18 14:36:25 -0400245 // Buffer-to-texture and Texture-to-buffer copies
Geoff Lang005df412013-10-16 14:12:50 -0400246 virtual bool supportsFastCopyBufferToTexture(GLenum internalFormat) const = 0;
Jamie Madilla21eea32013-09-18 14:36:25 -0400247 virtual bool fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
248 GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea) = 0;
249
shannonwoods@chromium.org6e4f2a62013-05-30 00:15:19 +0000250 virtual bool getLUID(LUID *adapterLuid) const = 0;
Jamie Madill95ffb862014-01-29 09:26:59 -0500251 virtual rx::VertexConversionType getVertexConversionType(const gl::VertexFormat &vertexFormat) const = 0;
252 virtual GLenum getVertexComponentType(const gl::VertexFormat &vertexFormat) const = 0;
shannonwoods@chromium.org6e4f2a62013-05-30 00:15:19 +0000253
daniel@transgaming.com2507f412012-10-31 18:46:48 +0000254 protected:
daniel@transgaming.comef21ab22012-10-31 17:52:47 +0000255 egl::Display *mDisplay;
daniel@transgaming.com4f0af572012-10-31 19:55:46 +0000256
257 private:
258 DISALLOW_COPY_AND_ASSIGN(Renderer);
259
Geoff Langc0b9ef42014-07-02 10:02:37 -0400260 virtual void generateCaps(gl::Caps *outCaps, gl::TextureCapsMap* outTextureCaps, gl::Extensions *outExtensions) const = 0;
Geoff Langcec35902014-04-16 10:52:36 -0400261
262 mutable bool mCapsInitialized;
263 mutable gl::Caps mCaps;
Geoff Langc0b9ef42014-07-02 10:02:37 -0400264 mutable gl::TextureCapsMap mTextureCaps;
265 mutable gl::Extensions mExtensions;
Geoff Langcec35902014-04-16 10:52:36 -0400266
shannon.woods%transgaming.com@gtempaccount.com785f1962013-04-13 03:34:45 +0000267 int mCurrentClientVersion;
daniel@transgaming.com621ce052012-10-31 17:52:29 +0000268};
269
270}
271#endif // LIBGLESV2_RENDERER_RENDERER_H_