Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 1 | /************************************************************************** |
| 2 | * |
| 3 | * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. |
| 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 above copyright notice and this permission notice (including the |
| 15 | * next paragraph) shall be included in all copies or substantial portions |
| 16 | * of the Software. |
| 17 | * |
| 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
| 21 | * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR |
| 22 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 25 | * |
| 26 | **************************************************************************/ |
| 27 | |
| 28 | |
José Fonseca | 2848688 | 2010-02-02 14:42:17 +0000 | [diff] [blame] | 29 | #include "util/u_inlines.h" |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 30 | #include "util/u_memory.h" |
José Fonseca | 5b8fa51 | 2008-04-14 23:55:36 +0900 | [diff] [blame] | 31 | #include "util/u_string.h" |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 32 | |
| 33 | #include "i915_reg.h" |
José Fonseca | f81b7a6 | 2008-02-27 15:59:09 +0900 | [diff] [blame] | 34 | #include "i915_context.h" |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 35 | #include "i915_screen.h" |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 36 | #include "i915_surface.h" |
| 37 | #include "i915_resource.h" |
Jakob Bornecrantz | bc88c95 | 2010-03-25 19:19:00 +0100 | [diff] [blame] | 38 | #include "i915_winsys.h" |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 39 | |
| 40 | |
| 41 | /* |
| 42 | * Probe functions |
| 43 | */ |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 44 | |
| 45 | |
| 46 | static const char * |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 47 | i915_get_vendor(struct pipe_screen *screen) |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 48 | { |
José Fonseca | 21a9493 | 2009-09-22 17:16:35 +0100 | [diff] [blame] | 49 | return "VMware, Inc."; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 50 | } |
| 51 | |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 52 | static const char * |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 53 | i915_get_name(struct pipe_screen *screen) |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 54 | { |
| 55 | static char buffer[128]; |
| 56 | const char *chipset; |
| 57 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 58 | switch (i915_screen(screen)->pci_id) { |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 59 | case PCI_CHIP_I915_G: |
| 60 | chipset = "915G"; |
| 61 | break; |
| 62 | case PCI_CHIP_I915_GM: |
| 63 | chipset = "915GM"; |
| 64 | break; |
| 65 | case PCI_CHIP_I945_G: |
| 66 | chipset = "945G"; |
| 67 | break; |
| 68 | case PCI_CHIP_I945_GM: |
| 69 | chipset = "945GM"; |
| 70 | break; |
| 71 | case PCI_CHIP_I945_GME: |
| 72 | chipset = "945GME"; |
| 73 | break; |
| 74 | case PCI_CHIP_G33_G: |
| 75 | chipset = "G33"; |
| 76 | break; |
| 77 | case PCI_CHIP_Q35_G: |
| 78 | chipset = "Q35"; |
| 79 | break; |
| 80 | case PCI_CHIP_Q33_G: |
| 81 | chipset = "Q33"; |
| 82 | break; |
| 83 | default: |
| 84 | chipset = "unknown"; |
| 85 | break; |
| 86 | } |
| 87 | |
José Fonseca | 5b8fa51 | 2008-04-14 23:55:36 +0900 | [diff] [blame] | 88 | util_snprintf(buffer, sizeof(buffer), "i915 (chipset: %s)", chipset); |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 89 | return buffer; |
| 90 | } |
| 91 | |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 92 | static int |
José Fonseca | e1238b5 | 2010-05-11 11:11:03 +0100 | [diff] [blame] | 93 | i915_get_param(struct pipe_screen *screen, enum pipe_cap param) |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 94 | { |
| 95 | switch (param) { |
| 96 | case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS: |
| 97 | return 8; |
Brian Paul | 98e2f6c | 2010-02-22 08:14:05 -0700 | [diff] [blame] | 98 | case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS: |
| 99 | return 0; |
| 100 | case PIPE_CAP_MAX_COMBINED_SAMPLERS: |
| 101 | return 8; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 102 | case PIPE_CAP_NPOT_TEXTURES: |
| 103 | return 1; |
| 104 | case PIPE_CAP_TWO_SIDED_STENCIL: |
| 105 | return 1; |
| 106 | case PIPE_CAP_GLSL: |
| 107 | return 0; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 108 | case PIPE_CAP_ANISOTROPIC_FILTER: |
| 109 | return 0; |
| 110 | case PIPE_CAP_POINT_SPRITE: |
| 111 | return 0; |
| 112 | case PIPE_CAP_MAX_RENDER_TARGETS: |
| 113 | return 1; |
| 114 | case PIPE_CAP_OCCLUSION_QUERY: |
| 115 | return 0; |
Mathias Fröhlich | cdbd5f4 | 2010-05-17 11:48:56 -0700 | [diff] [blame] | 116 | case PIPE_CAP_TIMER_QUERY: |
| 117 | return 0; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 118 | case PIPE_CAP_TEXTURE_SHADOW_MAP: |
| 119 | return 1; |
| 120 | case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: |
Brian Paul | e0d4f32 | 2010-03-08 13:59:39 -0700 | [diff] [blame] | 121 | return I915_MAX_TEXTURE_2D_LEVELS; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 122 | case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: |
Brian Paul | e0d4f32 | 2010-03-08 13:59:39 -0700 | [diff] [blame] | 123 | return I915_MAX_TEXTURE_3D_LEVELS; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 124 | case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: |
Brian Paul | e0d4f32 | 2010-03-08 13:59:39 -0700 | [diff] [blame] | 125 | return I915_MAX_TEXTURE_2D_LEVELS; |
Luca Barbieri | 6c403750 | 2010-01-21 05:36:14 +0100 | [diff] [blame] | 126 | case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: |
| 127 | case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: |
| 128 | return 1; |
| 129 | case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: |
| 130 | case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: |
| 131 | return 0; |
Roland Scheidegger | 4bc7b14 | 2010-05-29 01:28:21 +0200 | [diff] [blame^] | 132 | case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE: |
| 133 | /* disable for now */ |
| 134 | return 0; |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 135 | default: |
| 136 | return 0; |
| 137 | } |
| 138 | } |
| 139 | |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 140 | static float |
José Fonseca | e1238b5 | 2010-05-11 11:11:03 +0100 | [diff] [blame] | 141 | i915_get_paramf(struct pipe_screen *screen, enum pipe_cap param) |
Brian | 17188e4 | 2008-02-27 10:15:37 -0700 | [diff] [blame] | 142 | { |
| 143 | switch (param) { |
| 144 | case PIPE_CAP_MAX_LINE_WIDTH: |
| 145 | /* fall-through */ |
| 146 | case PIPE_CAP_MAX_LINE_WIDTH_AA: |
| 147 | return 7.5; |
| 148 | |
| 149 | case PIPE_CAP_MAX_POINT_WIDTH: |
| 150 | /* fall-through */ |
| 151 | case PIPE_CAP_MAX_POINT_WIDTH_AA: |
| 152 | return 255.0; |
| 153 | |
| 154 | case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: |
| 155 | return 4.0; |
| 156 | |
| 157 | case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: |
| 158 | return 16.0; |
| 159 | |
| 160 | default: |
| 161 | return 0; |
| 162 | } |
| 163 | } |
| 164 | |
Brian | 364f8ca | 2008-02-27 13:58:06 -0700 | [diff] [blame] | 165 | static boolean |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 166 | i915_is_format_supported(struct pipe_screen *screen, |
Roland Scheidegger | bccf31b | 2010-05-17 21:24:04 +0200 | [diff] [blame] | 167 | enum pipe_format format, |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 168 | enum pipe_texture_target target, |
Roland Scheidegger | bccf31b | 2010-05-17 21:24:04 +0200 | [diff] [blame] | 169 | unsigned sample_count, |
| 170 | unsigned tex_usage, |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 171 | unsigned geom_flags) |
Brian | 364f8ca | 2008-02-27 13:58:06 -0700 | [diff] [blame] | 172 | { |
| 173 | static const enum pipe_format tex_supported[] = { |
José Fonseca | b2b1e89 | 2010-03-01 18:12:19 +0000 | [diff] [blame] | 174 | PIPE_FORMAT_B8G8R8A8_UNORM, |
Jakob Bornecrantz | b4b4ac6 | 2010-03-25 00:41:21 +0100 | [diff] [blame] | 175 | PIPE_FORMAT_B8G8R8X8_UNORM, |
| 176 | PIPE_FORMAT_R8G8B8A8_UNORM, |
| 177 | #if 0 |
| 178 | PIPE_FORMAT_R8G8B8X8_UNORM, |
| 179 | #endif |
José Fonseca | b2b1e89 | 2010-03-01 18:12:19 +0000 | [diff] [blame] | 180 | PIPE_FORMAT_B5G6R5_UNORM, |
Brian Paul | 54f94a7 | 2008-04-30 16:50:17 -0600 | [diff] [blame] | 181 | PIPE_FORMAT_L8_UNORM, |
| 182 | PIPE_FORMAT_A8_UNORM, |
| 183 | PIPE_FORMAT_I8_UNORM, |
José Fonseca | b2b1e89 | 2010-03-01 18:12:19 +0000 | [diff] [blame] | 184 | PIPE_FORMAT_L8A8_UNORM, |
| 185 | PIPE_FORMAT_UYVY, |
| 186 | PIPE_FORMAT_YUYV, |
Roland Scheidegger | 4bc7b14 | 2010-05-29 01:28:21 +0200 | [diff] [blame^] | 187 | /* XXX why not? |
| 188 | PIPE_FORMAT_Z16_UNORM, */ |
| 189 | PIPE_FORMAT_Z24X8_UNORM, |
Roland Scheidegger | 6fb364a | 2010-03-30 01:35:49 +0200 | [diff] [blame] | 190 | PIPE_FORMAT_Z24_UNORM_S8_USCALED, |
Brian | 364f8ca | 2008-02-27 13:58:06 -0700 | [diff] [blame] | 191 | PIPE_FORMAT_NONE /* list terminator */ |
| 192 | }; |
Roland Scheidegger | bccf31b | 2010-05-17 21:24:04 +0200 | [diff] [blame] | 193 | static const enum pipe_format render_supported[] = { |
José Fonseca | b2b1e89 | 2010-03-01 18:12:19 +0000 | [diff] [blame] | 194 | PIPE_FORMAT_B8G8R8A8_UNORM, |
| 195 | PIPE_FORMAT_B5G6R5_UNORM, |
Roland Scheidegger | bccf31b | 2010-05-17 21:24:04 +0200 | [diff] [blame] | 196 | PIPE_FORMAT_NONE /* list terminator */ |
| 197 | }; |
| 198 | static const enum pipe_format depth_supported[] = { |
Roland Scheidegger | 4bc7b14 | 2010-05-29 01:28:21 +0200 | [diff] [blame^] | 199 | /* XXX why not? |
| 200 | PIPE_FORMAT_Z16_UNORM, */ |
| 201 | PIPE_FORMAT_Z24X8_UNORM, |
Roland Scheidegger | 6fb364a | 2010-03-30 01:35:49 +0200 | [diff] [blame] | 202 | PIPE_FORMAT_Z24_UNORM_S8_USCALED, |
Brian | 364f8ca | 2008-02-27 13:58:06 -0700 | [diff] [blame] | 203 | PIPE_FORMAT_NONE /* list terminator */ |
| 204 | }; |
| 205 | const enum pipe_format *list; |
| 206 | uint i; |
| 207 | |
Roland Scheidegger | bccf31b | 2010-05-17 21:24:04 +0200 | [diff] [blame] | 208 | if (sample_count > 1) |
| 209 | return FALSE; |
| 210 | |
| 211 | if(tex_usage & PIPE_BIND_DEPTH_STENCIL) |
| 212 | list = depth_supported; |
| 213 | else if (tex_usage & PIPE_BIND_RENDER_TARGET) |
| 214 | list = render_supported; |
José Fonseca | 8aafc03 | 2008-07-19 12:04:37 +0900 | [diff] [blame] | 215 | else |
| 216 | list = tex_supported; |
Brian | 364f8ca | 2008-02-27 13:58:06 -0700 | [diff] [blame] | 217 | |
| 218 | for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) { |
| 219 | if (list[i] == format) |
| 220 | return TRUE; |
| 221 | } |
| 222 | |
| 223 | return FALSE; |
| 224 | } |
| 225 | |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 226 | |
| 227 | /* |
| 228 | * Fence functions |
| 229 | */ |
| 230 | |
| 231 | |
| 232 | static void |
| 233 | i915_fence_reference(struct pipe_screen *screen, |
| 234 | struct pipe_fence_handle **ptr, |
| 235 | struct pipe_fence_handle *fence) |
| 236 | { |
| 237 | struct i915_screen *is = i915_screen(screen); |
| 238 | |
| 239 | is->iws->fence_reference(is->iws, ptr, fence); |
| 240 | } |
| 241 | |
| 242 | static int |
| 243 | i915_fence_signalled(struct pipe_screen *screen, |
| 244 | struct pipe_fence_handle *fence, |
| 245 | unsigned flags) |
| 246 | { |
| 247 | struct i915_screen *is = i915_screen(screen); |
| 248 | |
| 249 | return is->iws->fence_signalled(is->iws, fence); |
| 250 | } |
| 251 | |
| 252 | static int |
| 253 | i915_fence_finish(struct pipe_screen *screen, |
| 254 | struct pipe_fence_handle *fence, |
| 255 | unsigned flags) |
| 256 | { |
| 257 | struct i915_screen *is = i915_screen(screen); |
| 258 | |
| 259 | return is->iws->fence_finish(is->iws, fence); |
| 260 | } |
| 261 | |
| 262 | |
| 263 | /* |
| 264 | * Generic functions |
| 265 | */ |
| 266 | |
| 267 | |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 268 | static void |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 269 | i915_destroy_screen(struct pipe_screen *screen) |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 270 | { |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 271 | struct i915_screen *is = i915_screen(screen); |
José Fonseca | 9dcb956 | 2008-08-08 12:23:21 +0100 | [diff] [blame] | 272 | |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 273 | if (is->iws) |
| 274 | is->iws->destroy(is->iws); |
José Fonseca | 9dcb956 | 2008-08-08 12:23:21 +0100 | [diff] [blame] | 275 | |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 276 | FREE(is); |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 277 | } |
| 278 | |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 279 | /** |
| 280 | * Create a new i915_screen object |
| 281 | */ |
| 282 | struct pipe_screen * |
Jakob Bornecrantz | bc88c95 | 2010-03-25 19:19:00 +0100 | [diff] [blame] | 283 | i915_create_screen(struct i915_winsys *iws, uint pci_id) |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 284 | { |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 285 | struct i915_screen *is = CALLOC_STRUCT(i915_screen); |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 286 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 287 | if (!is) |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 288 | return NULL; |
| 289 | |
| 290 | switch (pci_id) { |
| 291 | case PCI_CHIP_I915_G: |
| 292 | case PCI_CHIP_I915_GM: |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 293 | is->is_i945 = FALSE; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 294 | break; |
| 295 | |
| 296 | case PCI_CHIP_I945_G: |
| 297 | case PCI_CHIP_I945_GM: |
| 298 | case PCI_CHIP_I945_GME: |
| 299 | case PCI_CHIP_G33_G: |
| 300 | case PCI_CHIP_Q33_G: |
| 301 | case PCI_CHIP_Q35_G: |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 302 | is->is_i945 = TRUE; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 303 | break; |
| 304 | |
| 305 | default: |
José Fonseca | baab98a | 2008-03-31 09:02:08 +0900 | [diff] [blame] | 306 | debug_printf("%s: unknown pci id 0x%x, cannot create screen\n", |
| 307 | __FUNCTION__, pci_id); |
Vinson Lee | 520b6ab | 2009-11-06 12:00:14 -0800 | [diff] [blame] | 308 | FREE(is); |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 309 | return NULL; |
| 310 | } |
| 311 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 312 | is->pci_id = pci_id; |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 313 | is->iws = iws; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 314 | |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 315 | is->base.winsys = NULL; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 316 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 317 | is->base.destroy = i915_destroy_screen; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 318 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 319 | is->base.get_name = i915_get_name; |
| 320 | is->base.get_vendor = i915_get_vendor; |
| 321 | is->base.get_param = i915_get_param; |
| 322 | is->base.get_paramf = i915_get_paramf; |
| 323 | is->base.is_format_supported = i915_is_format_supported; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 324 | |
Keith Whitwell | 7f41f54 | 2010-02-08 12:55:59 +0000 | [diff] [blame] | 325 | is->base.context_create = i915_create_context; |
| 326 | |
Jakob Bornecrantz | d211006 | 2009-08-30 20:49:01 +0100 | [diff] [blame] | 327 | is->base.fence_reference = i915_fence_reference; |
| 328 | is->base.fence_signalled = i915_fence_signalled; |
| 329 | is->base.fence_finish = i915_fence_finish; |
| 330 | |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 331 | i915_init_screen_resource_functions(is); |
| 332 | i915_init_screen_surface_functions(is); |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 333 | |
Jakob Bornecrantz | 1bb3a2c | 2009-08-30 21:10:36 +0100 | [diff] [blame] | 334 | return &is->base; |
Brian | aa59a93 | 2008-02-26 20:15:14 -0700 | [diff] [blame] | 335 | } |