~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
 *
 
3
 * Copyright 2009 VMware, Inc.
 
4
 * All Rights Reserved.
 
5
 *
 
6
 * Permission is hereby granted, free of charge, to any person obtaining a
 
7
 * copy of this software and associated documentation files (the
 
8
 * "Software"), to deal in the Software without restriction, including
 
9
 * without limitation the rights to use, copy, modify, merge, publish,
 
10
 * distribute, sub license, and/or sell copies of the Software, and to
 
11
 * permit persons to whom the Software is furnished to do so, subject to
 
12
 * the following conditions:
 
13
 *
 
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 
17
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 
18
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 
19
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 
20
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 
21
 *
 
22
 * The above copyright notice and this permission notice (including the
 
23
 * next paragraph) shall be included in all copies or substantial portions
 
24
 * of the Software.
 
25
 *
 
26
 *
 
27
 **************************************************************************/
 
28
 
 
29
/**
 
30
 * @file
 
31
 * LLVMpipe support.
 
32
 *
 
33
 * @author Jose Fonseca <jfonseca@vmware.com>
 
34
 */
 
35
 
 
36
 
 
37
#include <windows.h>
 
38
 
 
39
#include "stw_winsys.h"
 
40
#include "gdi/gdi_sw_winsys.h"
 
41
#include "softpipe/sp_texture.h"
 
42
#include "softpipe/sp_screen.h"
 
43
#include "softpipe/sp_public.h"
 
44
 
 
45
 
 
46
static struct pipe_screen *
 
47
gdi_softpipe_screen_create(void)
 
48
{
 
49
   static struct sw_winsys *winsys;
 
50
   struct pipe_screen *screen;
 
51
 
 
52
   winsys = gdi_create_sw_winsys();
 
53
   if(!winsys)
 
54
      goto no_winsys;
 
55
 
 
56
   screen = softpipe_create_screen(winsys);
 
57
   if(!screen)
 
58
      goto no_screen;
 
59
 
 
60
   return screen;
 
61
   
 
62
no_screen:
 
63
   winsys->destroy(winsys);
 
64
no_winsys:
 
65
   return NULL;
 
66
}
 
67
 
 
68
 
 
69
 
 
70
 
 
71
static void
 
72
gdi_softpipe_present(struct pipe_screen *screen,
 
73
                     struct pipe_surface *surface,
 
74
                     HDC hDC)
 
75
{
 
76
   /* This will fail if any interposing layer (trace, debug, etc) has
 
77
    * been introduced between the state-trackers and softpipe.
 
78
    *
 
79
    * Ideally this would get replaced with a call to
 
80
    * pipe_screen::flush_frontbuffer().
 
81
    *
 
82
    * Failing that, it may be necessary for intervening layers to wrap
 
83
    * other structs such as this stw_winsys as well...
 
84
    */
 
85
   gdi_sw_display(softpipe_screen(screen)->winsys,
 
86
                  softpipe_resource(surface->texture)->dt,
 
87
                  hDC);
 
88
}
 
89
 
 
90
 
 
91
static const struct stw_winsys stw_winsys = {
 
92
   &gdi_softpipe_screen_create,
 
93
   &gdi_softpipe_present,
 
94
   NULL, /* get_adapter_luid */
 
95
   NULL, /* shared_surface_open */
 
96
   NULL, /* shared_surface_close */
 
97
   NULL  /* compose */
 
98
};
 
99
 
 
100
 
 
101
BOOL WINAPI
 
102
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
 
103
{
 
104
   switch (fdwReason) {
 
105
   case DLL_PROCESS_ATTACH:
 
106
      stw_init(&stw_winsys);
 
107
      stw_init_thread();
 
108
      break;
 
109
 
 
110
   case DLL_THREAD_ATTACH:
 
111
      stw_init_thread();
 
112
      break;
 
113
 
 
114
   case DLL_THREAD_DETACH:
 
115
      stw_cleanup_thread();
 
116
      break;
 
117
 
 
118
   case DLL_PROCESS_DETACH:
 
119
      stw_cleanup_thread();
 
120
      stw_cleanup();
 
121
      break;
 
122
   }
 
123
   return TRUE;
 
124
}