2 Copyright (C) Intel Corp. 2006. All Rights Reserved.
3 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
4 develop this 3D driver.
6 Permission is hereby granted, free of charge, to any person obtaining
7 a 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, sublicense, 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:
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial
16 portions of the Software.
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **********************************************************************/
29 * Keith Whitwell <keith@tungstengraphics.com>
37 /** Number of general purpose registers (VS, WM, etc) */
38 #define BRW_MAX_GRF 128
40 /** Number of message register file registers */
41 #define BRW_MAX_MRF 16
64 GLuint notify_enable
:1;
66 GLuint wc_flush_enable
:1;
67 GLuint depth_stall_enable
:1;
75 GLuint dest_addr_type
:1;
83 /* These seem to be passed around as function args, so it works out
84 * better to keep them as #defines:
86 #define BRW_FLUSH_READ_CACHE 0x1
87 #define BRW_FLUSH_STATE_CACHE 0x2
88 #define BRW_INHIBIT_FLUSH_RENDER_CACHE 0x4
89 #define BRW_FLUSH_SNAPSHOT_COUNTERS 0x8
98 struct brw_vf_statistics
100 GLuint statistics_enable
:1;
107 struct brw_binding_table_pointers
109 struct header header
;
118 struct brw_blend_constant_color
120 struct header header
;
121 GLfloat blend_constant_color
[4];
125 struct brw_depthbuffer
127 union header_union header
;
134 GLuint software_tiled_rendering_mode
:2;
135 GLuint depth_offset_disable
:1;
137 GLuint tiled_surface
:1;
139 GLuint surface_type
:3;
144 GLuint dword2_base_addr
;
149 GLuint mipmap_layout
:1;
160 GLuint min_array_element
:11;
167 struct brw_depthbuffer_g4x
169 union header_union header
;
176 GLuint software_tiled_rendering_mode
:2;
177 GLuint depth_offset_disable
:1;
179 GLuint tiled_surface
:1;
181 GLuint surface_type
:3;
186 GLuint dword2_base_addr
;
191 GLuint mipmap_layout
:1;
202 GLuint min_array_element
:11;
214 } dword5
; /* NEW in Integrated Graphics Device */
219 struct header header
;
231 struct brw_global_depth_offset_clamp
233 struct header header
;
234 GLfloat depth_offset_clamp
;
237 struct brw_indexbuffer
243 GLuint index_format
:2;
244 GLuint cut_index_enable
:1;
256 /* NEW in Integrated Graphics Device */
257 struct brw_aa_line_parameters
259 struct header header
;
262 GLuint aa_coverage_slope
:8;
264 GLuint aa_coverage_bias
:8;
269 GLuint aa_coverage_endcap_slope
:8;
271 GLuint aa_coverage_endcap_bias
:8;
276 struct brw_line_stipple
278 struct header header
;
288 GLuint repeat_count
:9;
290 GLuint inverse_repeat_count
:16;
295 struct brw_pipelined_state_pointers
297 struct header header
;
301 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE */
308 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE */
315 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE */
321 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE */
327 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE */
333 GLuint offset
:27; /* Offset from GENERAL_STATE_BASE. KW: check me! */
338 struct brw_polygon_stipple_offset
340 struct header header
;
352 struct brw_polygon_stipple
354 struct header header
;
360 struct brw_pipeline_select
364 GLuint pipeline_select
:1;
371 struct brw_pipe_control
376 GLuint notify_enable
:1;
377 GLuint texture_cache_flush_enable
:1;
378 GLuint indirect_state_pointers_disable
:1;
379 GLuint instruction_state_cache_flush_enable
:1;
380 GLuint write_cache_flush_enable
:1;
381 GLuint depth_stall_enable
:1;
382 GLuint post_sync_operation
:2;
390 GLuint dest_addr_type
:1;
406 GLuint clp_realloc
:1;
408 GLuint vfe_realloc
:1;
431 struct brw_cs_urb_state
433 struct header header
;
437 GLuint nr_urb_entries
:3;
439 GLuint urb_entry_size
:5;
444 struct brw_constant_buffer
456 GLuint buffer_length
:6;
457 GLuint buffer_address
:26;
461 struct brw_state_base_address
463 struct header header
;
467 GLuint modify_enable
:1;
469 GLuint general_state_address
:27;
474 GLuint modify_enable
:1;
476 GLuint surface_state_address
:27;
481 GLuint modify_enable
:1;
483 GLuint indirect_object_state_address
:27;
488 GLuint modify_enable
:1;
490 GLuint general_state_upper_bound
:20;
495 GLuint modify_enable
:1;
497 GLuint indirect_object_state_upper_bound
:20;
501 struct brw_state_prefetch
503 struct header header
;
507 GLuint prefetch_count
:3;
509 GLuint prefetch_pointer
:26;
513 struct brw_system_instruction_pointer
515 struct header header
;
520 GLuint system_instruction_pointer
:28;
527 /* State structs for the various fixed function units:
534 GLuint grf_reg_count
:3;
536 GLuint kernel_start_pointer
:26; /* Offset from GENERAL_STATE_BASE */
541 GLuint ext_halt_exception_enable
:1;
542 GLuint sw_exception_enable
:1;
543 GLuint mask_stack_exception_enable
:1;
544 GLuint timeout_exception_enable
:1;
545 GLuint illegal_op_exception_enable
:1;
547 GLuint depth_coef_urb_read_offset
:6; /* WM only */
549 GLuint floating_point_mode
:1;
550 GLuint thread_priority
:1;
551 GLuint binding_table_entry_count
:8;
553 GLuint single_program_flow
:1;
558 GLuint per_thread_scratch_space
:4;
560 GLuint scratch_space_base_pointer
:22;
566 GLuint dispatch_grf_start_reg
:4;
567 GLuint urb_entry_read_offset
:6;
569 GLuint urb_entry_read_length
:6;
571 GLuint const_urb_entry_read_offset
:6;
573 GLuint const_urb_entry_read_length
:6;
579 struct brw_clip_unit_state
581 struct thread0 thread0
;
585 GLuint sw_exception_enable
:1;
587 GLuint mask_stack_exception_enable
:1;
589 GLuint illegal_op_exception_enable
:1;
591 GLuint floating_point_mode
:1;
592 GLuint thread_priority
:1;
593 GLuint binding_table_entry_count
:8;
595 GLuint single_program_flow
:1;
598 struct thread2 thread2
;
599 struct thread3 thread3
;
604 GLuint gs_output_stats
:1; /* not always */
605 GLuint stats_enable
:1;
606 GLuint nr_urb_entries
:7;
608 GLuint urb_entry_allocation_size
:5;
610 GLuint max_threads
:5; /* may be less */
618 GLuint userclip_enable_flags
:8;
619 GLuint userclip_must_clip
:1;
620 GLuint negative_w_clip_test
:1;
621 GLuint guard_band_enable
:1;
622 GLuint viewport_z_clip_enable
:1;
623 GLuint viewport_xy_clip_enable
:1;
624 GLuint vertex_position_space
:1;
632 GLuint clipper_viewport_state_ptr
:27;
636 GLfloat viewport_xmin
;
637 GLfloat viewport_xmax
;
638 GLfloat viewport_ymin
;
639 GLfloat viewport_ymax
;
642 struct gen6_blend_state
645 GLuint dest_blend_factor
:5;
646 GLuint source_blend_factor
:5;
650 GLuint ia_dest_blend_factor
:5;
651 GLuint ia_source_blend_factor
:5;
653 GLuint ia_blend_func
:3;
655 GLuint ia_blend_enable
:1;
656 GLuint blend_enable
:1;
660 GLuint post_blend_clamp_enable
:1;
661 GLuint pre_blend_clamp_enable
:1;
662 GLuint clamp_range
:2;
664 GLuint x_dither_offset
:2;
665 GLuint y_dither_offset
:2;
666 GLuint dither_enable
:1;
667 GLuint alpha_test_func
:3;
668 GLuint alpha_test_enable
:1;
670 GLuint logic_op_func
:4;
671 GLuint logic_op_enable
:1;
673 GLuint write_disable_b
:1;
674 GLuint write_disable_g
:1;
675 GLuint write_disable_r
:1;
676 GLuint write_disable_a
:1;
678 GLuint alpha_to_coverage_dither
:1;
679 GLuint alpha_to_one
:1;
680 GLuint alpha_to_coverage
:1;
684 struct gen6_color_calc_state
687 GLuint alpha_test_format
:1;
689 GLuint round_disable
:1;
690 GLuint bf_stencil_ref
:8;
691 GLuint stencil_ref
:8;
708 struct gen6_depth_stencil_state
712 GLuint bf_stencil_pass_depth_pass_op
:3;
713 GLuint bf_stencil_pass_depth_fail_op
:3;
714 GLuint bf_stencil_fail_op
:3;
715 GLuint bf_stencil_func
:3;
716 GLuint bf_stencil_enable
:1;
718 GLuint stencil_write_enable
:1;
719 GLuint stencil_pass_depth_pass_op
:3;
720 GLuint stencil_pass_depth_fail_op
:3;
721 GLuint stencil_fail_op
:3;
722 GLuint stencil_func
:3;
723 GLuint stencil_enable
:1;
727 GLuint bf_stencil_write_mask
:8;
728 GLuint bf_stencil_test_mask
:8;
729 GLuint stencil_write_mask
:8;
730 GLuint stencil_test_mask
:8;
735 GLuint depth_write_enable
:1;
736 GLuint depth_test_func
:3;
738 GLuint depth_test_enable
:1;
742 struct brw_cc_unit_state
747 GLuint bf_stencil_pass_depth_pass_op
:3;
748 GLuint bf_stencil_pass_depth_fail_op
:3;
749 GLuint bf_stencil_fail_op
:3;
750 GLuint bf_stencil_func
:3;
751 GLuint bf_stencil_enable
:1;
753 GLuint stencil_write_enable
:1;
754 GLuint stencil_pass_depth_pass_op
:3;
755 GLuint stencil_pass_depth_fail_op
:3;
756 GLuint stencil_fail_op
:3;
757 GLuint stencil_func
:3;
758 GLuint stencil_enable
:1;
764 GLuint bf_stencil_ref
:8;
765 GLuint stencil_write_mask
:8;
766 GLuint stencil_test_mask
:8;
767 GLuint stencil_ref
:8;
773 GLuint logicop_enable
:1;
775 GLuint depth_write_enable
:1;
776 GLuint depth_test_function
:3;
778 GLuint bf_stencil_write_mask
:8;
779 GLuint bf_stencil_test_mask
:8;
786 GLuint alpha_test_func
:3;
788 GLuint blend_enable
:1;
789 GLuint ia_blend_enable
:1;
791 GLuint alpha_test_format
:1;
798 GLuint cc_viewport_state_offset
:27; /* Offset from GENERAL_STATE_BASE */
804 GLuint ia_dest_blend_factor
:5;
805 GLuint ia_src_blend_factor
:5;
806 GLuint ia_blend_function
:3;
807 GLuint statistics_enable
:1;
808 GLuint logicop_func
:4;
810 GLuint dither_enable
:1;
815 GLuint clamp_post_alpha_blend
:1;
816 GLuint clamp_pre_alpha_blend
:1;
817 GLuint clamp_range
:2;
819 GLuint y_dither_offset
:2;
820 GLuint x_dither_offset
:2;
821 GLuint dest_blend_factor
:5;
822 GLuint src_blend_factor
:5;
823 GLuint blend_function
:3;
834 struct brw_sf_unit_state
836 struct thread0 thread0
;
837 struct thread1 thread1
;
838 struct thread2 thread2
;
839 struct thread3 thread3
;
844 GLuint stats_enable
:1;
845 GLuint nr_urb_entries
:7;
847 GLuint urb_entry_allocation_size
:5;
849 GLuint max_threads
:6;
855 GLuint front_winding
:1;
856 GLuint viewport_transform
:1;
858 GLuint sf_viewport_state_offset
:27; /* Offset from GENERAL_STATE_BASE */
864 GLuint dest_org_vbias
:4;
865 GLuint dest_org_hbias
:4;
867 GLuint disable_2x2_trifilter
:1;
868 GLuint disable_zero_pix_trifilter
:1;
869 GLuint point_rast_rule
:2;
870 GLuint line_endcap_aa_region_width
:2;
872 GLuint fast_scissor_disable
:1;
879 GLuint point_size
:11;
880 GLuint use_point_size_state
:1;
881 GLuint subpixel_precision
:1;
882 GLuint sprite_point
:1;
884 GLuint aa_line_distance_mode
:1;
886 GLuint linestrip_pv
:2;
887 GLuint tristrip_pv
:2;
888 GLuint line_last_pixel_enable
:1;
893 struct gen6_scissor_rect
901 struct brw_gs_unit_state
903 struct thread0 thread0
;
904 struct thread1 thread1
;
905 struct thread2 thread2
;
906 struct thread3 thread3
;
911 GLuint rendering_enable
:1; /* for Ironlake */
913 GLuint stats_enable
:1;
914 GLuint nr_urb_entries
:7;
916 GLuint urb_entry_allocation_size
:5;
918 GLuint max_threads
:5;
924 GLuint sampler_count
:3;
926 GLuint sampler_state_pointer
:27;
932 GLuint max_vp_index
:4;
934 GLuint svbi_post_inc_value
:10;
936 GLuint svbi_post_inc_enable
:1;
937 GLuint svbi_payload
:1;
938 GLuint discard_adjaceny
:1;
939 GLuint reorder_enable
:1;
945 struct brw_vs_unit_state
947 struct thread0 thread0
;
948 struct thread1 thread1
;
949 struct thread2 thread2
;
950 struct thread3 thread3
;
955 GLuint stats_enable
:1;
956 GLuint nr_urb_entries
:7;
958 GLuint urb_entry_allocation_size
:5;
960 GLuint max_threads
:6;
966 GLuint sampler_count
:3;
968 GLuint sampler_state_pointer
:27;
974 GLuint vert_cache_disable
:1;
980 struct brw_wm_unit_state
982 struct thread0 thread0
;
983 struct thread1 thread1
;
984 struct thread2 thread2
;
985 struct thread3 thread3
;
988 GLuint stats_enable
:1;
989 GLuint depth_buffer_clear
:1;
990 GLuint sampler_count
:3;
991 GLuint sampler_state_pointer
:27;
996 GLuint enable_8_pix
:1;
997 GLuint enable_16_pix
:1;
998 GLuint enable_32_pix
:1;
999 GLuint enable_con_32_pix
:1;
1000 GLuint enable_con_64_pix
:1;
1003 /* These next four bits are for Ironlake+ */
1004 GLuint fast_span_coverage_enable
:1;
1005 GLuint depth_buffer_clear
:1;
1006 GLuint depth_buffer_resolve_enable
:1;
1007 GLuint hierarchical_depth_buffer_resolve_enable
:1;
1009 GLuint legacy_global_depth_bias
:1;
1010 GLuint line_stipple
:1;
1011 GLuint depth_offset
:1;
1012 GLuint polygon_stipple
:1;
1013 GLuint line_aa_region_width
:2;
1014 GLuint line_endcap_aa_region_width
:2;
1015 GLuint early_depth_test
:1;
1016 GLuint thread_dispatch_enable
:1;
1017 GLuint program_uses_depth
:1;
1018 GLuint program_computes_depth
:1;
1019 GLuint program_uses_killpixel
:1;
1020 GLuint legacy_line_rast
: 1;
1021 GLuint transposed_urb_read_enable
:1;
1022 GLuint max_threads
:7;
1025 GLfloat global_depth_offset_constant
;
1026 GLfloat global_depth_offset_scale
;
1028 /* for Ironlake only */
1031 GLuint grf_reg_count_1
:3;
1033 GLuint kernel_start_pointer_1
:26;
1038 GLuint grf_reg_count_2
:3;
1040 GLuint kernel_start_pointer_2
:26;
1045 GLuint grf_reg_count_3
:3;
1047 GLuint kernel_start_pointer_3
:26;
1051 struct brw_sampler_default_color
{
1055 struct gen5_sampler_default_color
{
1064 struct brw_sampler_state
1069 GLuint shadow_function
:3;
1071 GLuint min_filter
:3;
1072 GLuint mag_filter
:3;
1073 GLuint mip_filter
:2;
1074 GLuint base_level
:5;
1075 GLuint min_mag_neq
:1;
1076 GLuint lod_preclamp
:1;
1077 GLuint default_color_mode
:1;
1084 GLuint r_wrap_mode
:3;
1085 GLuint t_wrap_mode
:3;
1086 GLuint s_wrap_mode
:3;
1087 GLuint cube_control_mode
:1;
1097 GLuint default_color_pointer
:27;
1102 GLuint non_normalized_coord
:1;
1104 GLuint address_round
:6;
1106 GLuint chroma_key_mode
:1;
1107 GLuint chroma_key_index
:2;
1108 GLuint chroma_key_enable
:1;
1109 GLuint monochrome_filter_width
:3;
1110 GLuint monochrome_filter_height
:3;
1115 struct brw_clipper_viewport
1123 struct brw_cc_viewport
1129 struct brw_sf_viewport
1140 /* scissor coordinates are inclusive */
1149 struct gen6_sf_viewport
{
1158 struct gen7_sf_clip_viewport
{
1180 /* Documented in the subsystem/shared-functions/sampler chapter...
1182 * vol5c Shared Functions - 1.13.4.1.1
1184 struct brw_surface_state
1187 GLuint cube_pos_z
:1;
1188 GLuint cube_neg_z
:1;
1189 GLuint cube_pos_y
:1;
1190 GLuint cube_neg_y
:1;
1191 GLuint cube_pos_x
:1;
1192 GLuint cube_neg_x
:1;
1194 /* Required on gen6 for surfaces accessed through render cache messages.
1196 GLuint render_cache_read_write
:1;
1197 /* Ironlake and newer: instead of replicating one of the texels */
1198 GLuint cube_corner_average
:1;
1199 GLuint mipmap_layout_mode
:1;
1200 GLuint vert_line_stride_ofs
:1;
1201 GLuint vert_line_stride
:1;
1202 GLuint color_blend
:1;
1203 GLuint writedisable_blue
:1;
1204 GLuint writedisable_green
:1;
1205 GLuint writedisable_red
:1;
1206 GLuint writedisable_alpha
:1;
1207 GLuint surface_format
:9; /**< BRW_SURFACEFORMAT_x */
1208 GLuint data_return_format
:1;
1210 GLuint surface_type
:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
1226 GLuint tiled_surface
:1;
1233 GLuint multisample_position_palette_index
:3;
1235 GLuint num_multisamples
:3;
1237 GLuint render_target_view_extent
:9;
1238 GLuint min_array_elt
:11;
1244 GLuint cache_control
:2;
1250 } ss5
; /* New in G4X */
1254 /* volume 5c Shared Functions - 1.13.4.1.2 */
1255 struct gen7_surface_state
1258 GLuint cube_pos_z
:1;
1259 GLuint cube_neg_z
:1;
1260 GLuint cube_pos_y
:1;
1261 GLuint cube_neg_y
:1;
1262 GLuint cube_pos_x
:1;
1263 GLuint cube_neg_x
:1;
1265 GLuint render_cache_read_write
:1;
1267 GLuint surface_array_spacing
:1;
1268 GLuint vert_line_stride_ofs
:1;
1269 GLuint vert_line_stride
:1;
1271 GLuint tiled_surface
:1;
1272 GLuint horizontal_alignment
:1;
1273 GLuint vertical_alignment
:2;
1274 GLuint surface_format
:9; /**< BRW_SURFACEFORMAT_x */
1277 GLuint surface_type
:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
1298 GLuint multisample_position_palette_index
:3;
1299 GLuint num_multisamples
:3;
1300 GLuint multisampled_surface_storage_format
:1;
1301 GLuint render_target_view_extent
:11;
1302 GLuint min_array_elt
:11;
1317 GLuint pad
; /* Multisample Control Surface stuff */
1321 GLuint resource_min_lod
:12;
1323 GLuint alpha_clear_color
:1;
1324 GLuint blue_clear_color
:1;
1325 GLuint green_clear_color
:1;
1326 GLuint red_clear_color
:1;
1331 struct brw_vertex_element_state
1335 GLuint src_offset
:11;
1337 GLuint src_format
:9;
1340 GLuint vertex_buffer_index
:5;
1345 GLuint dst_offset
:8;
1347 GLuint vfcomponent3
:4;
1348 GLuint vfcomponent2
:4;
1349 GLuint vfcomponent1
:4;
1350 GLuint vfcomponent0
:4;
1354 #define BRW_VEP_MAX 18
1356 struct brw_vertex_element_packet
{
1357 struct header header
;
1358 struct brw_vertex_element_state ve
[BRW_VEP_MAX
]; /* note: less than _TNL_ATTRIB_MAX */
1362 struct brw_urb_immediate
{
1365 GLuint swizzle_control
:2;
1370 GLuint response_length
:4;
1371 GLuint msg_length
:4;
1372 GLuint msg_target
:4;
1374 GLuint end_of_thread
:1;
1377 /* Instruction format for the execution units:
1380 struct brw_instruction
1386 GLuint access_mode
:1;
1387 GLuint mask_control
:1;
1388 GLuint dependency_control
:2;
1389 GLuint compression_control
:2; /* gen6: quater control */
1390 GLuint thread_control
:2;
1391 GLuint predicate_control
:4;
1392 GLuint predicate_inverse
:1;
1393 GLuint execution_size
:3;
1394 GLuint destreg__conditionalmod
:4; /* destreg - send, conditionalmod - others */
1395 GLuint acc_wr_control
:1;
1396 GLuint cmpt_control
:1;
1397 GLuint debug_control
:1;
1404 GLuint dest_reg_file
:2;
1405 GLuint dest_reg_type
:3;
1406 GLuint src0_reg_file
:2;
1407 GLuint src0_reg_type
:3;
1408 GLuint src1_reg_file
:2;
1409 GLuint src1_reg_type
:3;
1411 GLuint dest_subreg_nr
:5;
1412 GLuint dest_reg_nr
:8;
1413 GLuint dest_horiz_stride
:2;
1414 GLuint dest_address_mode
:1;
1419 GLuint dest_reg_file
:2;
1420 GLuint dest_reg_type
:3;
1421 GLuint src0_reg_file
:2;
1422 GLuint src0_reg_type
:3;
1423 GLuint src1_reg_file
:2; /* 0x00000c00 */
1424 GLuint src1_reg_type
:3; /* 0x00007000 */
1426 GLint dest_indirect_offset
:10; /* offset against the deref'd address reg */
1427 GLuint dest_subreg_nr
:3; /* subnr for the address reg a0.x */
1428 GLuint dest_horiz_stride
:2;
1429 GLuint dest_address_mode
:1;
1434 GLuint dest_reg_file
:2;
1435 GLuint dest_reg_type
:3;
1436 GLuint src0_reg_file
:2;
1437 GLuint src0_reg_type
:3;
1438 GLuint src1_reg_file
:2;
1439 GLuint src1_reg_type
:3;
1441 GLuint dest_writemask
:4;
1442 GLuint dest_subreg_nr
:1;
1443 GLuint dest_reg_nr
:8;
1444 GLuint dest_horiz_stride
:2;
1445 GLuint dest_address_mode
:1;
1450 GLuint dest_reg_file
:2;
1451 GLuint dest_reg_type
:3;
1452 GLuint src0_reg_file
:2;
1453 GLuint src0_reg_type
:3;
1455 GLuint dest_writemask
:4;
1456 GLint dest_indirect_offset
:6;
1457 GLuint dest_subreg_nr
:3;
1458 GLuint dest_horiz_stride
:2;
1459 GLuint dest_address_mode
:1;
1463 GLuint dest_reg_file
:2;
1464 GLuint dest_reg_type
:3;
1465 GLuint src0_reg_file
:2;
1466 GLuint src0_reg_type
:3;
1467 GLuint src1_reg_file
:2;
1468 GLuint src1_reg_type
:3;
1471 GLint jump_count
:16;
1479 GLuint src0_subreg_nr
:5;
1480 GLuint src0_reg_nr
:8;
1482 GLuint src0_negate
:1;
1483 GLuint src0_address_mode
:1;
1484 GLuint src0_horiz_stride
:2;
1485 GLuint src0_width
:3;
1486 GLuint src0_vert_stride
:4;
1487 GLuint flag_reg_nr
:1;
1493 GLint src0_indirect_offset
:10;
1494 GLuint src0_subreg_nr
:3;
1496 GLuint src0_negate
:1;
1497 GLuint src0_address_mode
:1;
1498 GLuint src0_horiz_stride
:2;
1499 GLuint src0_width
:3;
1500 GLuint src0_vert_stride
:4;
1501 GLuint flag_reg_nr
:1;
1507 GLuint src0_swz_x
:2;
1508 GLuint src0_swz_y
:2;
1509 GLuint src0_subreg_nr
:1;
1510 GLuint src0_reg_nr
:8;
1512 GLuint src0_negate
:1;
1513 GLuint src0_address_mode
:1;
1514 GLuint src0_swz_z
:2;
1515 GLuint src0_swz_w
:2;
1517 GLuint src0_vert_stride
:4;
1518 GLuint flag_reg_nr
:1;
1524 GLuint src0_swz_x
:2;
1525 GLuint src0_swz_y
:2;
1526 GLint src0_indirect_offset
:6;
1527 GLuint src0_subreg_nr
:3;
1529 GLuint src0_negate
:1;
1530 GLuint src0_address_mode
:1;
1531 GLuint src0_swz_z
:2;
1532 GLuint src0_swz_w
:2;
1534 GLuint src0_vert_stride
:4;
1535 GLuint flag_reg_nr
:1;
1542 GLuint end_of_thread
:1;
1545 } send_gen5
; /* for Ironlake only */
1553 GLuint src1_subreg_nr
:5;
1554 GLuint src1_reg_nr
:8;
1556 GLuint src1_negate
:1;
1557 GLuint src1_address_mode
:1;
1558 GLuint src1_horiz_stride
:2;
1559 GLuint src1_width
:3;
1560 GLuint src1_vert_stride
:4;
1566 GLuint src1_swz_x
:2;
1567 GLuint src1_swz_y
:2;
1568 GLuint src1_subreg_nr
:1;
1569 GLuint src1_reg_nr
:8;
1571 GLuint src1_negate
:1;
1572 GLuint src1_address_mode
:1;
1573 GLuint src1_swz_z
:2;
1574 GLuint src1_swz_w
:2;
1576 GLuint src1_vert_stride
:4;
1582 GLint src1_indirect_offset
:10;
1583 GLuint src1_subreg_nr
:3;
1585 GLuint src1_negate
:1;
1586 GLuint src1_address_mode
:1;
1587 GLuint src1_horiz_stride
:2;
1588 GLuint src1_width
:3;
1589 GLuint src1_vert_stride
:4;
1590 GLuint flag_reg_nr
:1;
1596 GLuint src1_swz_x
:2;
1597 GLuint src1_swz_y
:2;
1598 GLint src1_indirect_offset
:6;
1599 GLuint src1_subreg_nr
:3;
1601 GLuint src1_negate
:1;
1603 GLuint src1_swz_z
:2;
1604 GLuint src1_swz_w
:2;
1606 GLuint src1_vert_stride
:4;
1607 GLuint flag_reg_nr
:1;
1614 GLint jump_count
:16; /* note: signed */
1621 /* Signed jump distance to the ip to jump to if all channels
1622 * are disabled after the break or continue. It should point
1623 * to the end of the innermost control flow block, as that's
1624 * where some channel could get re-enabled.
1628 /* Signed jump distance to the location to resume execution
1629 * of this channel if it's enabled for the break or continue.
1641 GLuint response_length
:4;
1642 GLuint msg_length
:4;
1643 GLuint msg_target
:4;
1645 GLuint end_of_thread
:1;
1656 GLuint header_present
:1;
1657 GLuint response_length
:5;
1658 GLuint msg_length
:4;
1660 GLuint end_of_thread
:1;
1664 GLuint binding_table_index
:8;
1666 GLuint return_format
:2;
1668 GLuint response_length
:4;
1669 GLuint msg_length
:4;
1670 GLuint msg_target
:4;
1672 GLuint end_of_thread
:1;
1676 GLuint binding_table_index
:8;
1679 GLuint response_length
:4;
1680 GLuint msg_length
:4;
1681 GLuint msg_target
:4;
1683 GLuint end_of_thread
:1;
1687 GLuint binding_table_index
:8;
1692 GLuint header_present
:1;
1693 GLuint response_length
:5;
1694 GLuint msg_length
:4;
1696 GLuint end_of_thread
:1;
1699 struct brw_urb_immediate urb
;
1704 GLuint swizzle_control
:2;
1710 GLuint header_present
:1;
1711 GLuint response_length
:5;
1712 GLuint msg_length
:4;
1714 GLuint end_of_thread
:1;
1720 GLuint swizzle_control
:1;
1722 GLuint per_slot_offset
:1;
1724 GLuint header_present
:1;
1725 GLuint response_length
:5;
1726 GLuint msg_length
:4;
1728 GLuint end_of_thread
:1;
1732 GLuint binding_table_index
:8;
1733 GLuint msg_control
:4;
1735 GLuint target_cache
:2;
1736 GLuint response_length
:4;
1737 GLuint msg_length
:4;
1738 GLuint msg_target
:4;
1740 GLuint end_of_thread
:1;
1744 GLuint binding_table_index
:8;
1745 GLuint msg_control
:3;
1747 GLuint target_cache
:2;
1748 GLuint response_length
:4;
1749 GLuint msg_length
:4;
1750 GLuint msg_target
:4;
1752 GLuint end_of_thread
:1;
1756 GLuint binding_table_index
:8;
1757 GLuint msg_control
:3;
1759 GLuint target_cache
:2;
1761 GLuint header_present
:1;
1762 GLuint response_length
:5;
1763 GLuint msg_length
:4;
1765 GLuint end_of_thread
:1;
1769 GLuint binding_table_index
:8;
1770 GLuint msg_control
:3;
1771 GLuint pixel_scoreboard_clear
:1;
1773 GLuint send_commit_msg
:1;
1774 GLuint response_length
:4;
1775 GLuint msg_length
:4;
1776 GLuint msg_target
:4;
1778 GLuint end_of_thread
:1;
1782 GLuint binding_table_index
:8;
1783 GLuint msg_control
:3;
1784 GLuint pixel_scoreboard_clear
:1;
1786 GLuint send_commit_msg
:1;
1788 GLuint header_present
:1;
1789 GLuint response_length
:5;
1790 GLuint msg_length
:4;
1792 GLuint end_of_thread
:1;
1795 /* Sandybridge DP for sample cache, constant cache, render cache */
1797 GLuint binding_table_index
:8;
1798 GLuint msg_control
:5;
1801 GLuint header_present
:1;
1802 GLuint response_length
:5;
1803 GLuint msg_length
:4;
1805 GLuint end_of_thread
:1;
1806 } dp_sampler_const_cache
;
1809 GLuint binding_table_index
:8;
1810 GLuint msg_control
:3;
1811 GLuint slot_group_select
:1;
1812 GLuint pixel_scoreboard_clear
:1;
1814 GLuint send_commit_msg
:1;
1816 GLuint header_present
:1;
1817 GLuint response_length
:5;
1818 GLuint msg_length
:4;
1820 GLuint end_of_thread
:1;
1823 /* See volume vol5c.2 sections 2.11.2.1.5 and 2.11.21.2.2. */
1825 GLuint binding_table_index
:8;
1826 GLuint msg_control
:3;
1827 GLuint slot_group_select
:1;
1828 GLuint pixel_scoreboard_clear
:1;
1832 GLuint header_present
:1;
1833 GLuint response_length
:5;
1834 GLuint msg_length
:4;
1836 GLuint end_of_thread
:1;
1840 GLuint function_control
:16;
1841 GLuint response_length
:4;
1842 GLuint msg_length
:4;
1843 GLuint msg_target
:4;
1845 GLuint end_of_thread
:1;
1848 /* Of this struct, only end_of_thread is not present for gen6. */
1850 GLuint function_control
:19;
1851 GLuint header_present
:1;
1852 GLuint response_length
:5;
1853 GLuint msg_length
:4;
1855 GLuint end_of_thread
:1;