Commit b913188e by Nicolas Capens Committed by Nicolas Capens

Fix S3TC compilation on Linux.

BUG=14602552 Change-Id: Ie2488d4301ed119ff9cc0105954f875f7e3050fd Reviewed-on: https://swiftshader-review.googlesource.com/1120Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 81b9ca65
...@@ -738,7 +738,7 @@ EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) ...@@ -738,7 +738,7 @@ EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
{ {
return error(EGL_BAD_SURFACE, EGL_FALSE); return error(EGL_BAD_SURFACE, EGL_FALSE);
} }
draw_surface->setSwapInterval(interval); draw_surface->setSwapInterval(interval);
return success(EGL_TRUE); return success(EGL_TRUE);
...@@ -1026,7 +1026,7 @@ EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) ...@@ -1026,7 +1026,7 @@ EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
} }
eglSurface->swap(); eglSurface->swap();
return success(EGL_TRUE); return success(EGL_TRUE);
} }
catch(std::bad_alloc&) catch(std::bad_alloc&)
...@@ -1127,7 +1127,7 @@ EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenu ...@@ -1127,7 +1127,7 @@ EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenu
return error(EGL_BAD_MATCH, EGL_NO_IMAGE_KHR); return error(EGL_BAD_MATCH, EGL_NO_IMAGE_KHR);
} }
GLuint name = (GLuint)buffer; GLuint name = reinterpret_cast<intptr_t>(buffer);
if(name == 0) if(name == 0)
{ {
......
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
#define PERF_HUD 0 // Display time spent on vertex, setup and pixel processing for each thread #define PERF_HUD 0 // Display time spent on vertex, setup and pixel processing for each thread
#define PERF_PROFILE 0 // Profile various pipeline stages and display the timing in SwiftConfig #define PERF_PROFILE 0 // Profile various pipeline stages and display the timing in SwiftConfig
#define S3TC_SUPPORT (_WIN32) #if defined(_WIN32)
#define S3TC_SUPPORT 1
#else
#define S3TC_SUPPORT 0
#endif
#if PERF_PROFILE #if PERF_PROFILE
enum enum
...@@ -50,7 +54,7 @@ struct Profiler ...@@ -50,7 +54,7 @@ struct Profiler
int64_t texOperations; int64_t texOperations;
int64_t texOperationsTotal; int64_t texOperationsTotal;
int64_t texOperationsFrame; int64_t texOperationsFrame;
int64_t compressedTex; int64_t compressedTex;
int64_t compressedTexTotal; int64_t compressedTexTotal;
int64_t compressedTexFrame; int64_t compressedTexFrame;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment