Permalink
Browse files

Further buildfixes

  • Loading branch information...
1 parent 674937a commit 5af8b152e1a96a883877ddfb02ed12aaab5b67bf @hrydgard committed Dec 26, 2016
@@ -51,17 +51,21 @@ static const GLushort glBlendFactorLookup[(size_t)BlendFactor::COUNT] = {
GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA,
GL_ONE_MINUS_CONSTANT_ALPHA,
+#if !defined(USING_GLES2) // TODO: Remove when we have better headers
GL_SRC1_COLOR,
GL_ONE_MINUS_SRC1_COLOR,
-#if !defined(USING_GLES2) // TODO: Remove when we have better headers
GL_SRC1_ALPHA,
GL_ONE_MINUS_SRC1_ALPHA,
#elif !defined(IOS)
+ GL_SRC1_COLOR_EXT,
+ GL_ONE_MINUS_SRC1_COLOR_EXT,
GL_SRC1_ALPHA_EXT,
GL_ONE_MINUS_SRC1_ALPHA_EXT,
#else
GL_INVALID_ENUM,
GL_INVALID_ENUM,
+ GL_INVALID_ENUM,
+ GL_INVALID_ENUM,
#endif
GL_INVALID_ENUM,
};
@@ -52,8 +52,8 @@ class TextureCache : public TextureCacheCommon {
void Clear(bool delete_them);
void StartFrame();
- void Invalidate(u32 addr, int size, GPUInvalidationType type);
- void InvalidateAll(GPUInvalidationType type);
+ void Invalidate(u32 addr, int size, GPUInvalidationType type) override;
+ void InvalidateAll(GPUInvalidationType type) override;
void ClearNextFrame();
void SetFramebufferManager(FramebufferManager *fbManager) {
@@ -79,9 +79,9 @@ class AndroidEGLGraphicsContext : public AndroidGraphicsContext {
void SwapBuffers() override;
void SwapInterval(int interval) override {}
void Resize() override {}
- Thin3DContext *CreateThin3DContext() override {
+ Draw::DrawContext *CreateThin3DContext() override {
CheckGLExtensions();
- return T3DCreateGLContext();
+ return Draw::T3DCreateGLContext();
}
private:
@@ -145,9 +145,9 @@ class AndroidJavaEGLGraphicsContext : public GraphicsContext {
void SwapBuffers() override {}
void SwapInterval(int interval) override {}
void Resize() override {}
- Thin3DContext *CreateThin3DContext() override {
+ Draw::DrawContext *CreateThin3DContext() override {
CheckGLExtensions();
- return T3DCreateGLContext();
+ return Draw::T3DCreateGLContext();
}
};
@@ -166,8 +166,8 @@ class AndroidVulkanContext : public AndroidGraphicsContext {
void *GetAPIContext() override { return g_Vulkan; }
- Thin3DContext *CreateThin3DContext() override {
- return T3DCreateVulkanContext(g_Vulkan);
+ Draw::DrawContext *CreateThin3DContext() override {
+ return Draw::T3DCreateVulkanContext(g_Vulkan);
}
};
@@ -40,8 +40,8 @@ void SimulateGamepad(InputState *input);
class QtDummyGraphicsContext : public DummyGraphicsContext {
public:
- Thin3DContext *CreateThin3DContext() override {
- return T3DCreateGLContext();
+ Draw::DrawContext *CreateThin3DContext() override {
+ return Draw::T3DCreateGLContext();
}
};
@@ -553,9 +553,9 @@ DrawContext *T3DCreateGLContext();
#ifdef _WIN32
DrawContext *T3DCreateDX9Context(IDirect3D9 *d3d, IDirect3D9Ex *d3dEx, int adapterId, IDirect3DDevice9 *device, IDirect3DDevice9Ex *deviceEx);
+DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context);
#endif
DrawContext *T3DCreateVulkanContext(VulkanContext *context);
-DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context);
} // namespace Draw
@@ -48,17 +48,33 @@ static const unsigned short blendFactorToGL[] = {
GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA,
GL_ONE_MINUS_CONSTANT_ALPHA,
+#if !defined(USING_GLES2) // TODO: Remove when we have better headers
GL_SRC1_COLOR,
GL_ONE_MINUS_SRC1_COLOR,
GL_SRC1_ALPHA,
GL_ONE_MINUS_SRC1_ALPHA,
+#elif !defined(IOS)
+ GL_SRC1_COLOR_EXT,
+ GL_ONE_MINUS_SRC1_COLOR_EXT,
+ GL_SRC1_ALPHA_EXT,
+ GL_ONE_MINUS_SRC1_ALPHA_EXT,
+#else
+ GL_INVALID_ENUM,
+ GL_INVALID_ENUM,
+ GL_INVALID_ENUM,
+ GL_INVALID_ENUM,
+#endif
};
static const unsigned short texWrapToGL[] = {
GL_REPEAT,
GL_MIRRORED_REPEAT,
GL_CLAMP_TO_EDGE,
+#if !defined(USING_GLES2)
GL_CLAMP_TO_BORDER,
+#else
+ GL_REPEAT,
+#endif
};
static const unsigned short texFilterToGL[] = {
@@ -112,11 +128,25 @@ static const unsigned short primToGL[] = {
GL_TRIANGLES,
GL_TRIANGLE_STRIP,
GL_TRIANGLE_FAN,
+#if !defined(USING_GLES2) // TODO: Remove when we have better headers
GL_PATCHES,
GL_LINES_ADJACENCY,
GL_LINE_STRIP_ADJACENCY,
GL_TRIANGLES_ADJACENCY,
GL_TRIANGLE_STRIP_ADJACENCY,
+#elif !defined(IOS)
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+#else
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+ GL_POINTS,
+#endif
};
static const char *glsl_fragment_prelude =
@@ -294,10 +324,12 @@ class OpenGLBuffer : public Buffer, GfxResourceHolder {
GLuint ShaderStageToOpenGL(ShaderStage stage) {
switch (stage) {
case ShaderStage::VERTEX: return GL_VERTEX_SHADER;
+#ifndef USING_GLES2
case ShaderStage::COMPUTE: return GL_COMPUTE_SHADER;
case ShaderStage::EVALUATION: return GL_TESS_EVALUATION_SHADER;
case ShaderStage::CONTROL: return GL_TESS_CONTROL_SHADER;
case ShaderStage::GEOMETRY: return GL_GEOMETRY_SHADER;
+#endif
case ShaderStage::FRAGMENT:
default:
return GL_FRAGMENT_SHADER;
@@ -36,9 +36,9 @@
class IOSDummyGraphicsContext : public DummyGraphicsContext {
public:
- Thin3DContext *CreateThin3DContext() override {
+ Draw::DrawContext *CreateThin3DContext() override {
CheckGLExtensions();
- return T3DCreateGLContext();
+ return Draw::T3DCreateGLContext();
}
};

0 comments on commit 5af8b15

Please sign in to comment.