2 * Copyright © 2012 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 #include "main/blend.h"
25 #include "main/mtypes.h"
26 #include "main/samplerobj.h"
27 #include "main/texformat.h"
28 #include "main/teximage.h"
29 #include "program/prog_parameter.h"
31 #include "intel_mipmap_tree.h"
32 #include "intel_batchbuffer.h"
33 #include "intel_tex.h"
34 #include "intel_fbo.h"
35 #include "intel_buffer_objects.h"
37 #include "brw_context.h"
38 #include "brw_state.h"
39 #include "brw_defines.h"
43 * Convert an swizzle enumeration (i.e. SWIZZLE_X) to one of the Gen7.5+
44 * "Shader Channel Select" enumerations (i.e. HSW_SCS_RED). The mappings are
46 * SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_ZERO, SWIZZLE_ONE
49 * SCS_RED, SCS_GREEN, SCS_BLUE, SCS_ALPHA, SCS_ZERO, SCS_ONE
51 * which is simply adding 4 then modding by 8 (or anding with 7).
54 swizzle_to_scs(unsigned swizzle
)
56 return (swizzle
+ 4) & 7;
60 surface_tiling_resource_mode(uint32_t tr_mode
)
63 case INTEL_MIPTREE_TRMODE_YF
:
64 return GEN9_SURFACE_TRMODE_TILEYF
;
65 case INTEL_MIPTREE_TRMODE_YS
:
66 return GEN9_SURFACE_TRMODE_TILEYS
;
68 return GEN9_SURFACE_TRMODE_NONE
;
73 surface_tiling_mode(uint32_t tiling
)
77 return GEN8_SURFACE_TILING_X
;
79 return GEN8_SURFACE_TILING_Y
;
81 return GEN8_SURFACE_TILING_NONE
;
86 vertical_alignment(const struct brw_context
*brw
,
87 const struct intel_mipmap_tree
*mt
,
90 /* On Gen9+ vertical alignment is ignored for 1D surfaces and when
91 * tr_mode is not TRMODE_NONE. Set to an arbitrary non-reserved value.
94 (mt
->tr_mode
!= INTEL_MIPTREE_TRMODE_NONE
||
95 surf_type
== BRW_SURFACE_1D
))
96 return GEN8_SURFACE_VALIGN_4
;
100 return GEN8_SURFACE_VALIGN_4
;
102 return GEN8_SURFACE_VALIGN_8
;
104 return GEN8_SURFACE_VALIGN_16
;
106 unreachable("Unsupported vertical surface alignment.");
111 horizontal_alignment(const struct brw_context
*brw
,
112 const struct intel_mipmap_tree
*mt
,
115 /* On Gen9+ horizontal alignment is ignored when tr_mode is not
116 * TRMODE_NONE. Set to an arbitrary non-reserved value.
119 (mt
->tr_mode
!= INTEL_MIPTREE_TRMODE_NONE
||
120 gen9_use_linear_1d_layout(brw
, mt
)))
121 return GEN8_SURFACE_HALIGN_4
;
123 switch (mt
->halign
) {
125 return GEN8_SURFACE_HALIGN_4
;
127 return GEN8_SURFACE_HALIGN_8
;
129 return GEN8_SURFACE_HALIGN_16
;
131 unreachable("Unsupported horizontal surface alignment.");
136 allocate_surface_state(struct brw_context
*brw
, uint32_t *out_offset
, int index
)
138 int dwords
= brw
->gen
>= 9 ? 16 : 13;
139 uint32_t *surf
= __brw_state_batch(brw
, AUB_TRACE_SURFACE_STATE
,
140 dwords
* 4, 64, index
, out_offset
);
141 memset(surf
, 0, dwords
* 4);
146 gen8_emit_buffer_surface_state(struct brw_context
*brw
,
147 uint32_t *out_offset
,
149 unsigned buffer_offset
,
150 unsigned surface_format
,
151 unsigned buffer_size
,
155 const unsigned mocs
= brw
->gen
>= 9 ? SKL_MOCS_WB
: BDW_MOCS_WB
;
156 uint32_t *surf
= allocate_surface_state(brw
, out_offset
, -1);
158 surf
[0] = BRW_SURFACE_BUFFER
<< BRW_SURFACE_TYPE_SHIFT
|
159 surface_format
<< BRW_SURFACE_FORMAT_SHIFT
|
160 BRW_SURFACE_RC_READ_WRITE
;
161 surf
[1] = SET_FIELD(mocs
, GEN8_SURFACE_MOCS
);
163 surf
[2] = SET_FIELD((buffer_size
- 1) & 0x7f, GEN7_SURFACE_WIDTH
) |
164 SET_FIELD(((buffer_size
- 1) >> 7) & 0x3fff, GEN7_SURFACE_HEIGHT
);
165 if (surface_format
== BRW_SURFACEFORMAT_RAW
)
166 surf
[3] = SET_FIELD(((buffer_size
- 1) >> 21) & 0x3ff, BRW_SURFACE_DEPTH
);
168 surf
[3] = SET_FIELD(((buffer_size
- 1) >> 21) & 0x3f, BRW_SURFACE_DEPTH
);
169 surf
[3] |= (pitch
- 1);
170 surf
[7] = SET_FIELD(HSW_SCS_RED
, GEN7_SURFACE_SCS_R
) |
171 SET_FIELD(HSW_SCS_GREEN
, GEN7_SURFACE_SCS_G
) |
172 SET_FIELD(HSW_SCS_BLUE
, GEN7_SURFACE_SCS_B
) |
173 SET_FIELD(HSW_SCS_ALPHA
, GEN7_SURFACE_SCS_A
);
175 *((uint64_t *) &surf
[8]) = (bo
? bo
->offset64
: 0) + buffer_offset
;
177 /* Emit relocation to surface contents. */
179 drm_intel_bo_emit_reloc(brw
->batch
.bo
, *out_offset
+ 8 * 4,
180 bo
, buffer_offset
, I915_GEM_DOMAIN_SAMPLER
,
181 rw
? I915_GEM_DOMAIN_SAMPLER
: 0);
186 gen8_emit_fast_clear_color(struct brw_context
*brw
,
187 struct intel_mipmap_tree
*mt
,
191 surf
[12] = mt
->gen9_fast_clear_color
.ui
[0];
192 surf
[13] = mt
->gen9_fast_clear_color
.ui
[1];
193 surf
[14] = mt
->gen9_fast_clear_color
.ui
[2];
194 surf
[15] = mt
->gen9_fast_clear_color
.ui
[3];
196 surf
[7] |= mt
->fast_clear_color_value
;
200 gen8_emit_texture_surface_state(struct brw_context
*brw
,
201 struct intel_mipmap_tree
*mt
,
203 unsigned min_layer
, unsigned max_layer
,
204 unsigned min_level
, unsigned max_level
,
207 uint32_t *surf_offset
,
208 bool rw
, bool for_gather
)
210 const unsigned depth
= max_layer
- min_layer
;
211 struct intel_mipmap_tree
*aux_mt
= NULL
;
212 uint32_t aux_mode
= 0;
213 uint32_t mocs_wb
= brw
->gen
>= 9 ? SKL_MOCS_WB
: BDW_MOCS_WB
;
214 int surf_index
= surf_offset
- &brw
->wm
.base
.surf_offset
[0];
215 unsigned tiling_mode
, pitch
;
216 const unsigned tr_mode
= surface_tiling_resource_mode(mt
->tr_mode
);
217 const uint32_t surf_type
= translate_tex_target(target
);
219 if (mt
->format
== MESA_FORMAT_S_UINT8
) {
220 tiling_mode
= GEN8_SURFACE_TILING_W
;
221 pitch
= 2 * mt
->pitch
;
223 tiling_mode
= surface_tiling_mode(mt
->tiling
);
229 aux_mode
= GEN8_SURFACE_AUX_MODE_MCS
;
232 * From the BDW PRM, Volume 2d, page 260 (RENDER_SURFACE_STATE):
233 * "When MCS is enabled for non-MSRT, HALIGN_16 must be used"
235 * From the hardware spec for GEN9:
236 * "When Auxiliary Surface Mode is set to AUX_CCS_D or AUX_CCS_E, HALIGN
239 if (brw
->gen
>= 9 || mt
->num_samples
== 1)
240 assert(mt
->halign
== 16);
243 assert(mt
->num_samples
> 1 ||
244 brw_losslessly_compressible_format(brw
, surf_type
));
249 uint32_t *surf
= allocate_surface_state(brw
, surf_offset
, surf_index
);
251 surf
[0] = SET_FIELD(surf_type
, BRW_SURFACE_TYPE
) |
252 format
<< BRW_SURFACE_FORMAT_SHIFT
|
253 vertical_alignment(brw
, mt
, surf_type
) |
254 horizontal_alignment(brw
, mt
, surf_type
) |
257 if (surf_type
== BRW_SURFACE_CUBE
) {
258 surf
[0] |= BRW_SURFACE_CUBEFACE_ENABLES
;
261 /* From the CHV PRM, Volume 2d, page 321 (RENDER_SURFACE_STATE dword 0
262 * bit 9 "Sampler L2 Bypass Mode Disable" Programming Notes):
264 * This bit must be set for the following surface types: BC2_UNORM
265 * BC3_UNORM BC5_UNORM BC5_SNORM BC7_UNORM
267 if ((brw
->gen
>= 9 || brw
->is_cherryview
) &&
268 (format
== BRW_SURFACEFORMAT_BC2_UNORM
||
269 format
== BRW_SURFACEFORMAT_BC3_UNORM
||
270 format
== BRW_SURFACEFORMAT_BC5_UNORM
||
271 format
== BRW_SURFACEFORMAT_BC5_SNORM
||
272 format
== BRW_SURFACEFORMAT_BC7_UNORM
))
273 surf
[0] |= GEN8_SURFACE_SAMPLER_L2_BYPASS_DISABLE
;
275 if (_mesa_is_array_texture(target
) || target
== GL_TEXTURE_CUBE_MAP
)
276 surf
[0] |= GEN8_SURFACE_IS_ARRAY
;
278 surf
[1] = SET_FIELD(mocs_wb
, GEN8_SURFACE_MOCS
) | mt
->qpitch
>> 2;
280 surf
[2] = SET_FIELD(mt
->logical_width0
- 1, GEN7_SURFACE_WIDTH
) |
281 SET_FIELD(mt
->logical_height0
- 1, GEN7_SURFACE_HEIGHT
);
283 surf
[3] = SET_FIELD(depth
- 1, BRW_SURFACE_DEPTH
) | (pitch
- 1);
285 surf
[4] = gen7_surface_msaa_bits(mt
->num_samples
, mt
->msaa_layout
) |
286 SET_FIELD(min_layer
, GEN7_SURFACE_MIN_ARRAY_ELEMENT
) |
287 SET_FIELD(depth
- 1, GEN7_SURFACE_RENDER_TARGET_VIEW_EXTENT
);
289 surf
[5] = SET_FIELD(min_level
- mt
->first_level
, GEN7_SURFACE_MIN_LOD
) |
290 (max_level
- min_level
- 1); /* mip count */
293 surf
[5] |= SET_FIELD(tr_mode
, GEN9_SURFACE_TRMODE
);
294 /* Disable Mip Tail by setting a large value. */
295 surf
[5] |= SET_FIELD(15, GEN9_SURFACE_MIP_TAIL_START_LOD
);
299 uint32_t tile_w
, tile_h
;
300 assert(aux_mt
->tiling
== I915_TILING_Y
);
301 intel_get_tile_dims(aux_mt
->tiling
, aux_mt
->tr_mode
,
302 aux_mt
->cpp
, &tile_w
, &tile_h
);
303 surf
[6] = SET_FIELD(mt
->qpitch
/ 4, GEN8_SURFACE_AUX_QPITCH
) |
304 SET_FIELD((aux_mt
->pitch
/ tile_w
) - 1,
305 GEN8_SURFACE_AUX_PITCH
) |
309 gen8_emit_fast_clear_color(brw
, mt
, surf
);
311 SET_FIELD(swizzle_to_scs(GET_SWZ(swizzle
, 0)), GEN7_SURFACE_SCS_R
) |
312 SET_FIELD(swizzle_to_scs(GET_SWZ(swizzle
, 1)), GEN7_SURFACE_SCS_G
) |
313 SET_FIELD(swizzle_to_scs(GET_SWZ(swizzle
, 2)), GEN7_SURFACE_SCS_B
) |
314 SET_FIELD(swizzle_to_scs(GET_SWZ(swizzle
, 3)), GEN7_SURFACE_SCS_A
);
316 *((uint64_t *) &surf
[8]) = mt
->bo
->offset64
+ mt
->offset
; /* reloc */
319 *((uint64_t *) &surf
[10]) = aux_mt
->bo
->offset64
;
320 drm_intel_bo_emit_reloc(brw
->batch
.bo
, *surf_offset
+ 10 * 4,
322 I915_GEM_DOMAIN_SAMPLER
,
323 (rw
? I915_GEM_DOMAIN_SAMPLER
: 0));
326 /* Emit relocation to surface contents */
327 drm_intel_bo_emit_reloc(brw
->batch
.bo
,
328 *surf_offset
+ 8 * 4,
331 I915_GEM_DOMAIN_SAMPLER
,
332 (rw
? I915_GEM_DOMAIN_SAMPLER
: 0));
336 gen8_update_texture_surface(struct gl_context
*ctx
,
338 uint32_t *surf_offset
,
341 struct brw_context
*brw
= brw_context(ctx
);
342 struct gl_texture_object
*obj
= ctx
->Texture
.Unit
[unit
]._Current
;
344 if (obj
->Target
== GL_TEXTURE_BUFFER
) {
345 brw_update_buffer_texture_surface(ctx
, unit
, surf_offset
);
348 struct gl_texture_image
*firstImage
= obj
->Image
[0][obj
->BaseLevel
];
349 struct intel_texture_object
*intel_obj
= intel_texture_object(obj
);
350 struct intel_mipmap_tree
*mt
= intel_obj
->mt
;
351 struct gl_sampler_object
*sampler
= _mesa_get_samplerobj(ctx
, unit
);
352 /* If this is a view with restricted NumLayers, then our effective depth
353 * is not just the miptree depth.
355 const unsigned depth
= (obj
->Immutable
&& obj
->Target
!= GL_TEXTURE_3D
?
356 obj
->NumLayers
: mt
->logical_depth0
);
358 /* Handling GL_ALPHA as a surface format override breaks 1.30+ style
359 * texturing functions that return a float, as our code generation always
360 * selects the .x channel (which would always be 0).
362 const bool alpha_depth
= obj
->DepthMode
== GL_ALPHA
&&
363 (firstImage
->_BaseFormat
== GL_DEPTH_COMPONENT
||
364 firstImage
->_BaseFormat
== GL_DEPTH_STENCIL
);
365 const unsigned swizzle
= (unlikely(alpha_depth
) ? SWIZZLE_XYZW
:
366 brw_get_texture_swizzle(&brw
->ctx
, obj
));
368 unsigned format
= translate_tex_format(brw
, intel_obj
->_Format
,
369 sampler
->sRGBDecode
);
370 if (obj
->StencilSampling
&& firstImage
->_BaseFormat
== GL_DEPTH_STENCIL
) {
372 format
= BRW_SURFACEFORMAT_R8_UINT
;
375 gen8_emit_texture_surface_state(brw
, mt
, obj
->Target
,
376 obj
->MinLayer
, obj
->MinLayer
+ depth
,
377 obj
->MinLevel
+ obj
->BaseLevel
,
378 obj
->MinLevel
+ intel_obj
->_MaxLevel
+ 1,
379 format
, swizzle
, surf_offset
,
385 * Creates a null surface.
387 * This is used when the shader doesn't write to any color output. An FB
388 * write to target 0 will still be emitted, because that's how the thread is
389 * terminated (and computed depth is returned), so we need to have the
390 * hardware discard the target 0 color output..
393 gen8_emit_null_surface_state(struct brw_context
*brw
,
397 uint32_t *out_offset
)
399 uint32_t *surf
= allocate_surface_state(brw
, out_offset
, -1);
401 surf
[0] = BRW_SURFACE_NULL
<< BRW_SURFACE_TYPE_SHIFT
|
402 BRW_SURFACEFORMAT_B8G8R8A8_UNORM
<< BRW_SURFACE_FORMAT_SHIFT
|
403 GEN8_SURFACE_TILING_Y
;
404 surf
[2] = SET_FIELD(width
- 1, GEN7_SURFACE_WIDTH
) |
405 SET_FIELD(height
- 1, GEN7_SURFACE_HEIGHT
);
409 * Sets up a surface state structure to point at the given region.
410 * While it is only used for the front/back buffer currently, it should be
411 * usable for further buffers when doing ARB_draw_buffer support.
414 gen8_update_renderbuffer_surface(struct brw_context
*brw
,
415 struct gl_renderbuffer
*rb
,
416 bool layered
, unsigned unit
/* unused */,
419 struct gl_context
*ctx
= &brw
->ctx
;
420 struct intel_renderbuffer
*irb
= intel_renderbuffer(rb
);
421 struct intel_mipmap_tree
*mt
= irb
->mt
;
422 struct intel_mipmap_tree
*aux_mt
= NULL
;
423 uint32_t aux_mode
= 0;
424 unsigned width
= mt
->logical_width0
;
425 unsigned height
= mt
->logical_height0
;
426 unsigned pitch
= mt
->pitch
;
427 uint32_t tiling
= mt
->tiling
;
428 unsigned tr_mode
= surface_tiling_resource_mode(mt
->tr_mode
);
432 bool is_array
= false;
433 int depth
= MAX2(irb
->layer_count
, 1);
434 const int min_array_element
= (mt
->format
== MESA_FORMAT_S_UINT8
) ?
435 irb
->mt_layer
: (irb
->mt_layer
/ MAX2(mt
->num_samples
, 1));
437 rb
->TexImage
? rb
->TexImage
->TexObject
->Target
: GL_TEXTURE_2D
;
438 const uint32_t mocs
= brw
->gen
>= 9 ? SKL_MOCS_PTE
: BDW_MOCS_PTE
;
440 intel_miptree_used_for_rendering(mt
);
443 case GL_TEXTURE_CUBE_MAP_ARRAY
:
444 case GL_TEXTURE_CUBE_MAP
:
445 surf_type
= BRW_SURFACE_2D
;
450 depth
= MAX2(irb
->mt
->logical_depth0
, 1);
453 surf_type
= translate_tex_target(gl_target
);
454 is_array
= _mesa_tex_target_is_array(gl_target
);
459 /* Render targets can't use IMS layout. Stencil in turn gets configured as
460 * single sampled and indexed manually by the program.
462 if (mt
->format
== MESA_FORMAT_S_UINT8
) {
463 brw_configure_w_tiled(mt
, true, &width
, &height
, &pitch
,
466 assert(mt
->msaa_layout
!= INTEL_MSAA_LAYOUT_IMS
);
467 assert(brw_render_target_supported(brw
, rb
));
468 mesa_format rb_format
= _mesa_get_render_format(ctx
,
469 intel_rb_format(irb
));
470 format
= brw
->render_target_format
[rb_format
];
471 if (unlikely(!brw
->format_supported_as_render_target
[rb_format
]))
472 _mesa_problem(ctx
, "%s: renderbuffer format %s unsupported\n",
473 __func__
, _mesa_get_format_name(rb_format
));
478 aux_mode
= GEN8_SURFACE_AUX_MODE_MCS
;
481 * From the BDW PRM, Volume 2d, page 260 (RENDER_SURFACE_STATE):
482 * "When MCS is enabled for non-MSRT, HALIGN_16 must be used"
484 * From the hardware spec for GEN9:
485 * "When Auxiliary Surface Mode is set to AUX_CCS_D or AUX_CCS_E, HALIGN
488 if (brw
->gen
>= 9 || mt
->num_samples
== 1)
489 assert(mt
->halign
== 16);
492 uint32_t *surf
= allocate_surface_state(brw
, &offset
, surf_index
);
494 surf
[0] = (surf_type
<< BRW_SURFACE_TYPE_SHIFT
) |
495 (is_array
? GEN7_SURFACE_IS_ARRAY
: 0) |
496 (format
<< BRW_SURFACE_FORMAT_SHIFT
) |
497 vertical_alignment(brw
, mt
, surf_type
) |
498 horizontal_alignment(brw
, mt
, surf_type
) |
499 surface_tiling_mode(tiling
);
501 surf
[1] = SET_FIELD(mocs
, GEN8_SURFACE_MOCS
) | mt
->qpitch
>> 2;
503 surf
[2] = SET_FIELD(width
- 1, GEN7_SURFACE_WIDTH
) |
504 SET_FIELD(height
- 1, GEN7_SURFACE_HEIGHT
);
506 surf
[3] = (depth
- 1) << BRW_SURFACE_DEPTH_SHIFT
|
507 (pitch
- 1); /* Surface Pitch */
509 surf
[4] = min_array_element
<< GEN7_SURFACE_MIN_ARRAY_ELEMENT_SHIFT
|
510 (depth
- 1) << GEN7_SURFACE_RENDER_TARGET_VIEW_EXTENT_SHIFT
;
512 if (mt
->format
!= MESA_FORMAT_S_UINT8
)
513 surf
[4] |= gen7_surface_msaa_bits(mt
->num_samples
, mt
->msaa_layout
);
515 surf
[5] = irb
->mt_level
- irb
->mt
->first_level
;
518 surf
[5] |= SET_FIELD(tr_mode
, GEN9_SURFACE_TRMODE
);
519 /* Disable Mip Tail by setting a large value. */
520 surf
[5] |= SET_FIELD(15, GEN9_SURFACE_MIP_TAIL_START_LOD
);
524 uint32_t tile_w
, tile_h
;
525 assert(aux_mt
->tiling
== I915_TILING_Y
);
526 intel_get_tile_dims(aux_mt
->tiling
, aux_mt
->tr_mode
,
527 aux_mt
->cpp
, &tile_w
, &tile_h
);
528 surf
[6] = SET_FIELD(mt
->qpitch
/ 4, GEN8_SURFACE_AUX_QPITCH
) |
529 SET_FIELD((aux_mt
->pitch
/ tile_w
) - 1,
530 GEN8_SURFACE_AUX_PITCH
) |
534 gen8_emit_fast_clear_color(brw
, mt
, surf
);
535 surf
[7] |= SET_FIELD(HSW_SCS_RED
, GEN7_SURFACE_SCS_R
) |
536 SET_FIELD(HSW_SCS_GREEN
, GEN7_SURFACE_SCS_G
) |
537 SET_FIELD(HSW_SCS_BLUE
, GEN7_SURFACE_SCS_B
) |
538 SET_FIELD(HSW_SCS_ALPHA
, GEN7_SURFACE_SCS_A
);
540 assert(mt
->offset
% mt
->cpp
== 0);
541 *((uint64_t *) &surf
[8]) = mt
->bo
->offset64
+ mt
->offset
; /* reloc */
544 *((uint64_t *) &surf
[10]) = aux_mt
->bo
->offset64
;
545 drm_intel_bo_emit_reloc(brw
->batch
.bo
,
548 I915_GEM_DOMAIN_RENDER
, I915_GEM_DOMAIN_RENDER
);
551 drm_intel_bo_emit_reloc(brw
->batch
.bo
,
555 I915_GEM_DOMAIN_RENDER
,
556 I915_GEM_DOMAIN_RENDER
);
562 gen8_init_vtable_surface_functions(struct brw_context
*brw
)
564 brw
->vtbl
.update_texture_surface
= gen8_update_texture_surface
;
565 brw
->vtbl
.update_renderbuffer_surface
= gen8_update_renderbuffer_surface
;
566 brw
->vtbl
.emit_null_surface_state
= gen8_emit_null_surface_state
;
567 brw
->vtbl
.emit_texture_surface_state
= gen8_emit_texture_surface_state
;
568 brw
->vtbl
.emit_buffer_surface_state
= gen8_emit_buffer_surface_state
;