From: Alexander von Gluck IV Date: Sat, 27 Dec 2014 06:12:54 +0000 (+0000) Subject: gallium/target: Drop no longer needed Haiku viewport override X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c7f8959957e5b6eec2dcb5816c0c0a58e66ef77;p=mesa.git gallium/target: Drop no longer needed Haiku viewport override * Drop no longer needed mesa headers * Haiku LLVM pipe working with LLVM 3.5.0 on x86_64 --- diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp index 5df5234bcbc..62db7e2c39d 100644 --- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp +++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp @@ -15,9 +15,6 @@ #include "bitmap_wrapper.h" extern "C" { #include "glapi/glapi.h" -#include "main/context.h" -#include "main/framebuffer.h" -#include "main/renderbuffer.h" #include "main/viewport.h" #include "pipe/p_format.h" #include "state_tracker/st_cb_fbo.h" @@ -44,31 +41,6 @@ extern "C" { #define ERROR(x...) printf("GalliumContext: " x) -static void -hgl_viewport(struct gl_context* glContext) -{ - // TODO: We should try to eliminate this function - - GLint x = glContext->ViewportArray[0].X; - GLint y = glContext->ViewportArray[0].Y; - GLint width = glContext->ViewportArray[0].Width; - GLint height = glContext->ViewportArray[0].Height; - - TRACE("%s(glContext: %p, x: %d, y: %d, w: %d, h: %d\n", __func__, - glContext, x, y, width, height); - - _mesa_check_init_viewport(glContext, width, height); - - struct gl_framebuffer *draw = glContext->WinSysDrawBuffer; - struct gl_framebuffer *read = glContext->WinSysReadBuffer; - - if (draw) - _mesa_resize_framebuffer(glContext, draw, width, height); - if (read) - _mesa_resize_framebuffer(glContext, read, width, height); -} - - GalliumContext::GalliumContext(ulong options) : fOptions(options), @@ -228,8 +200,6 @@ GalliumContext::CreateContext(Bitmap *bitmap) struct st_context *stContext = (struct st_context*)context->st; - stContext->ctx->Driver.Viewport = hgl_viewport; - // Init Gallium3D Post Processing // TODO: no pp filters are enabled yet through postProcessEnable context->postProcess = pp_init(stContext->pipe, context->postProcessEnable, @@ -406,6 +376,7 @@ GalliumContext::ResizeViewport(int32 width, int32 height) for (context_id i = 0; i < CONTEXT_MAX; i++) { if (fContext[i] && fContext[i]->st) { struct st_context *stContext = (struct st_context*)fContext[i]->st; + // TODO: _mesa_set_viewport needs to be removed for something st_api? _mesa_set_viewport(stContext->ctx, 0, 0, 0, width, height); st_manager_validate_framebuffers(stContext); }