brw_structs.h revision 4b929c75e2d868cbfb21b5dbeb1f6c689a903be6
1/* 2 Copyright (C) Intel Corp. 2006. All Rights Reserved. 3 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to 4 develop this 3D driver. 5 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: 13 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. 17 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. 25 26 **********************************************************************/ 27 /* 28 * Authors: 29 * Keith Whitwell <keith@tungstengraphics.com> 30 */ 31 32 33#ifndef BRW_STRUCTS_H 34#define BRW_STRUCTS_H 35 36 37/** Number of general purpose registers (VS, WM, etc) */ 38#define BRW_MAX_GRF 128 39 40/** Number of message register file registers */ 41#define BRW_MAX_MRF 16 42 43 44/* Command packets: 45 */ 46struct header 47{ 48 GLuint length:16; 49 GLuint opcode:16; 50}; 51 52 53union header_union 54{ 55 struct header bits; 56 GLuint dword; 57}; 58 59struct brw_3d_control 60{ 61 struct 62 { 63 GLuint length:8; 64 GLuint notify_enable:1; 65 GLuint pad:3; 66 GLuint wc_flush_enable:1; 67 GLuint depth_stall_enable:1; 68 GLuint operation:2; 69 GLuint opcode:16; 70 } header; 71 72 struct 73 { 74 GLuint pad:2; 75 GLuint dest_addr_type:1; 76 GLuint dest_addr:29; 77 } dest; 78 79 GLuint dword2; 80 GLuint dword3; 81}; 82 83 84struct brw_3d_primitive 85{ 86 struct 87 { 88 GLuint length:8; 89 GLuint pad:2; 90 GLuint topology:5; 91 GLuint indexed:1; 92 GLuint opcode:16; 93 } header; 94 95 GLuint verts_per_instance; 96 GLuint start_vert_location; 97 GLuint instance_count; 98 GLuint start_instance_location; 99 GLuint base_vert_location; 100}; 101 102/* These seem to be passed around as function args, so it works out 103 * better to keep them as #defines: 104 */ 105#define BRW_FLUSH_READ_CACHE 0x1 106#define BRW_FLUSH_STATE_CACHE 0x2 107#define BRW_INHIBIT_FLUSH_RENDER_CACHE 0x4 108#define BRW_FLUSH_SNAPSHOT_COUNTERS 0x8 109 110struct brw_mi_flush 111{ 112 GLuint flags:4; 113 GLuint pad:12; 114 GLuint opcode:16; 115}; 116 117struct brw_vf_statistics 118{ 119 GLuint statistics_enable:1; 120 GLuint pad:15; 121 GLuint opcode:16; 122}; 123 124 125 126struct brw_binding_table_pointers 127{ 128 struct header header; 129 GLuint vs; 130 GLuint gs; 131 GLuint clp; 132 GLuint sf; 133 GLuint wm; 134}; 135 136 137struct brw_blend_constant_color 138{ 139 struct header header; 140 GLfloat blend_constant_color[4]; 141}; 142 143 144struct brw_depthbuffer 145{ 146 union header_union header; 147 148 union { 149 struct { 150 GLuint pitch:18; 151 GLuint format:3; 152 GLuint pad:2; 153 GLuint software_tiled_rendering_mode:2; 154 GLuint depth_offset_disable:1; 155 GLuint tile_walk:1; 156 GLuint tiled_surface:1; 157 GLuint pad2:1; 158 GLuint surface_type:3; 159 } bits; 160 GLuint dword; 161 } dword1; 162 163 GLuint dword2_base_addr; 164 165 union { 166 struct { 167 GLuint pad:1; 168 GLuint mipmap_layout:1; 169 GLuint lod:4; 170 GLuint width:13; 171 GLuint height:13; 172 } bits; 173 GLuint dword; 174 } dword3; 175 176 union { 177 struct { 178 GLuint pad:10; 179 GLuint min_array_element:11; 180 GLuint depth:11; 181 } bits; 182 GLuint dword; 183 } dword4; 184}; 185 186struct brw_depthbuffer_g4x 187{ 188 union header_union header; 189 190 union { 191 struct { 192 GLuint pitch:18; 193 GLuint format:3; 194 GLuint pad:2; 195 GLuint software_tiled_rendering_mode:2; 196 GLuint depth_offset_disable:1; 197 GLuint tile_walk:1; 198 GLuint tiled_surface:1; 199 GLuint pad2:1; 200 GLuint surface_type:3; 201 } bits; 202 GLuint dword; 203 } dword1; 204 205 GLuint dword2_base_addr; 206 207 union { 208 struct { 209 GLuint pad:1; 210 GLuint mipmap_layout:1; 211 GLuint lod:4; 212 GLuint width:13; 213 GLuint height:13; 214 } bits; 215 GLuint dword; 216 } dword3; 217 218 union { 219 struct { 220 GLuint pad:10; 221 GLuint min_array_element:11; 222 GLuint depth:11; 223 } bits; 224 GLuint dword; 225 } dword4; 226 227 union { 228 struct { 229 GLuint xoffset:16; 230 GLuint yoffset:16; 231 } bits; 232 GLuint dword; 233 } dword5; /* NEW in Integrated Graphics Device */ 234}; 235 236struct brw_drawrect 237{ 238 struct header header; 239 GLuint xmin:16; 240 GLuint ymin:16; 241 GLuint xmax:16; 242 GLuint ymax:16; 243 GLuint xorg:16; 244 GLuint yorg:16; 245}; 246 247 248 249 250struct brw_global_depth_offset_clamp 251{ 252 struct header header; 253 GLfloat depth_offset_clamp; 254}; 255 256struct brw_indexbuffer 257{ 258 union { 259 struct 260 { 261 GLuint length:8; 262 GLuint index_format:2; 263 GLuint cut_index_enable:1; 264 GLuint pad:5; 265 GLuint opcode:16; 266 } bits; 267 GLuint dword; 268 269 } header; 270 271 GLuint buffer_start; 272 GLuint buffer_end; 273}; 274 275/* NEW in Integrated Graphics Device */ 276struct brw_aa_line_parameters 277{ 278 struct header header; 279 280 struct { 281 GLuint aa_coverage_slope:8; 282 GLuint pad0:8; 283 GLuint aa_coverage_bias:8; 284 GLuint pad1:8; 285 } bits0; 286 287 struct { 288 GLuint aa_coverage_endcap_slope:8; 289 GLuint pad0:8; 290 GLuint aa_coverage_endcap_bias:8; 291 GLuint pad1:8; 292 } bits1; 293}; 294 295struct brw_line_stipple 296{ 297 struct header header; 298 299 struct 300 { 301 GLuint pattern:16; 302 GLuint pad:16; 303 } bits0; 304 305 struct 306 { 307 GLuint repeat_count:9; 308 GLuint pad:7; 309 GLuint inverse_repeat_count:16; 310 } bits1; 311}; 312 313 314struct brw_pipelined_state_pointers 315{ 316 struct header header; 317 318 struct { 319 GLuint pad:5; 320 GLuint offset:27; /* Offset from GENERAL_STATE_BASE */ 321 } vs; 322 323 struct 324 { 325 GLuint enable:1; 326 GLuint pad:4; 327 GLuint offset:27; /* Offset from GENERAL_STATE_BASE */ 328 } gs; 329 330 struct 331 { 332 GLuint enable:1; 333 GLuint pad:4; 334 GLuint offset:27; /* Offset from GENERAL_STATE_BASE */ 335 } clp; 336 337 struct 338 { 339 GLuint pad:5; 340 GLuint offset:27; /* Offset from GENERAL_STATE_BASE */ 341 } sf; 342 343 struct 344 { 345 GLuint pad:5; 346 GLuint offset:27; /* Offset from GENERAL_STATE_BASE */ 347 } wm; 348 349 struct 350 { 351 GLuint pad:5; 352 GLuint offset:27; /* Offset from GENERAL_STATE_BASE. KW: check me! */ 353 } cc; 354}; 355 356 357struct brw_polygon_stipple_offset 358{ 359 struct header header; 360 361 struct { 362 GLuint y_offset:5; 363 GLuint pad:3; 364 GLuint x_offset:5; 365 GLuint pad0:19; 366 } bits0; 367}; 368 369 370 371struct brw_polygon_stipple 372{ 373 struct header header; 374 GLuint stipple[32]; 375}; 376 377 378 379struct brw_pipeline_select 380{ 381 struct 382 { 383 GLuint pipeline_select:1; 384 GLuint pad:15; 385 GLuint opcode:16; 386 } header; 387}; 388 389 390struct brw_pipe_control 391{ 392 struct 393 { 394 GLuint length:8; 395 GLuint notify_enable:1; 396 GLuint texture_cache_flush_enable:1; 397 GLuint indirect_state_pointers_disable:1; 398 GLuint instruction_state_cache_flush_enable:1; 399 GLuint write_cache_flush_enable:1; 400 GLuint depth_stall_enable:1; 401 GLuint post_sync_operation:2; 402 403 GLuint opcode:16; 404 } header; 405 406 struct 407 { 408 GLuint pad:2; 409 GLuint dest_addr_type:1; 410 GLuint dest_addr:29; 411 } bits1; 412 413 GLuint data0; 414 GLuint data1; 415}; 416 417 418struct brw_urb_fence 419{ 420 struct 421 { 422 GLuint length:8; 423 GLuint vs_realloc:1; 424 GLuint gs_realloc:1; 425 GLuint clp_realloc:1; 426 GLuint sf_realloc:1; 427 GLuint vfe_realloc:1; 428 GLuint cs_realloc:1; 429 GLuint pad:2; 430 GLuint opcode:16; 431 } header; 432 433 struct 434 { 435 GLuint vs_fence:10; 436 GLuint gs_fence:10; 437 GLuint clp_fence:10; 438 GLuint pad:2; 439 } bits0; 440 441 struct 442 { 443 GLuint sf_fence:10; 444 GLuint vf_fence:10; 445 GLuint cs_fence:11; 446 GLuint pad:1; 447 } bits1; 448}; 449 450struct brw_cs_urb_state 451{ 452 struct header header; 453 454 struct 455 { 456 GLuint nr_urb_entries:3; 457 GLuint pad:1; 458 GLuint urb_entry_size:5; 459 GLuint pad0:23; 460 } bits0; 461}; 462 463struct brw_constant_buffer 464{ 465 struct 466 { 467 GLuint length:8; 468 GLuint valid:1; 469 GLuint pad:7; 470 GLuint opcode:16; 471 } header; 472 473 struct 474 { 475 GLuint buffer_length:6; 476 GLuint buffer_address:26; 477 } bits0; 478}; 479 480struct brw_state_base_address 481{ 482 struct header header; 483 484 struct 485 { 486 GLuint modify_enable:1; 487 GLuint pad:4; 488 GLuint general_state_address:27; 489 } bits0; 490 491 struct 492 { 493 GLuint modify_enable:1; 494 GLuint pad:4; 495 GLuint surface_state_address:27; 496 } bits1; 497 498 struct 499 { 500 GLuint modify_enable:1; 501 GLuint pad:4; 502 GLuint indirect_object_state_address:27; 503 } bits2; 504 505 struct 506 { 507 GLuint modify_enable:1; 508 GLuint pad:11; 509 GLuint general_state_upper_bound:20; 510 } bits3; 511 512 struct 513 { 514 GLuint modify_enable:1; 515 GLuint pad:11; 516 GLuint indirect_object_state_upper_bound:20; 517 } bits4; 518}; 519 520struct brw_state_prefetch 521{ 522 struct header header; 523 524 struct 525 { 526 GLuint prefetch_count:3; 527 GLuint pad:3; 528 GLuint prefetch_pointer:26; 529 } bits0; 530}; 531 532struct brw_system_instruction_pointer 533{ 534 struct header header; 535 536 struct 537 { 538 GLuint pad:4; 539 GLuint system_instruction_pointer:28; 540 } bits0; 541}; 542 543 544 545 546/* State structs for the various fixed function units: 547 */ 548 549 550struct thread0 551{ 552 GLuint pad0:1; 553 GLuint grf_reg_count:3; 554 GLuint pad1:2; 555 GLuint kernel_start_pointer:26; /* Offset from GENERAL_STATE_BASE */ 556}; 557 558struct thread1 559{ 560 GLuint ext_halt_exception_enable:1; 561 GLuint sw_exception_enable:1; 562 GLuint mask_stack_exception_enable:1; 563 GLuint timeout_exception_enable:1; 564 GLuint illegal_op_exception_enable:1; 565 GLuint pad0:3; 566 GLuint depth_coef_urb_read_offset:6; /* WM only */ 567 GLuint pad1:2; 568 GLuint floating_point_mode:1; 569 GLuint thread_priority:1; 570 GLuint binding_table_entry_count:8; 571 GLuint pad3:5; 572 GLuint single_program_flow:1; 573}; 574 575struct thread2 576{ 577 GLuint per_thread_scratch_space:4; 578 GLuint pad0:6; 579 GLuint scratch_space_base_pointer:22; 580}; 581 582 583struct thread3 584{ 585 GLuint dispatch_grf_start_reg:4; 586 GLuint urb_entry_read_offset:6; 587 GLuint pad0:1; 588 GLuint urb_entry_read_length:6; 589 GLuint pad1:1; 590 GLuint const_urb_entry_read_offset:6; 591 GLuint pad2:1; 592 GLuint const_urb_entry_read_length:6; 593 GLuint pad3:1; 594}; 595 596 597 598struct brw_clip_unit_state 599{ 600 struct thread0 thread0; 601 struct 602 { 603 GLuint pad0:7; 604 GLuint sw_exception_enable:1; 605 GLuint pad1:3; 606 GLuint mask_stack_exception_enable:1; 607 GLuint pad2:1; 608 GLuint illegal_op_exception_enable:1; 609 GLuint pad3:2; 610 GLuint floating_point_mode:1; 611 GLuint thread_priority:1; 612 GLuint binding_table_entry_count:8; 613 GLuint pad4:5; 614 GLuint single_program_flow:1; 615 } thread1; 616 617 struct thread2 thread2; 618 struct thread3 thread3; 619 620 struct 621 { 622 GLuint pad0:9; 623 GLuint gs_output_stats:1; /* not always */ 624 GLuint stats_enable:1; 625 GLuint nr_urb_entries:7; 626 GLuint pad1:1; 627 GLuint urb_entry_allocation_size:5; 628 GLuint pad2:1; 629 GLuint max_threads:5; /* may be less */ 630 GLuint pad3:2; 631 } thread4; 632 633 struct 634 { 635 GLuint pad0:13; 636 GLuint clip_mode:3; 637 GLuint userclip_enable_flags:8; 638 GLuint userclip_must_clip:1; 639 GLuint negative_w_clip_test:1; 640 GLuint guard_band_enable:1; 641 GLuint viewport_z_clip_enable:1; 642 GLuint viewport_xy_clip_enable:1; 643 GLuint vertex_position_space:1; 644 GLuint api_mode:1; 645 GLuint pad2:1; 646 } clip5; 647 648 struct 649 { 650 GLuint pad0:5; 651 GLuint clipper_viewport_state_ptr:27; 652 } clip6; 653 654 655 GLfloat viewport_xmin; 656 GLfloat viewport_xmax; 657 GLfloat viewport_ymin; 658 GLfloat viewport_ymax; 659}; 660 661struct gen6_blend_state 662{ 663 struct { 664 GLuint dest_blend_factor:5; 665 GLuint source_blend_factor:5; 666 GLuint pad3:1; 667 GLuint blend_func:3; 668 GLuint pad2:1; 669 GLuint ia_dest_blend_factor:5; 670 GLuint ia_source_blend_factor:5; 671 GLuint pad1:1; 672 GLuint ia_blend_func:3; 673 GLuint pad0:1; 674 GLuint ia_blend_enable:1; 675 GLuint blend_enable:1; 676 } blend0; 677 678 struct { 679 GLuint post_blend_clamp_enable:1; 680 GLuint pre_blend_clamp_enable:1; 681 GLuint clamp_range:2; 682 GLuint pad0:4; 683 GLuint x_dither_offset:2; 684 GLuint y_dither_offset:2; 685 GLuint dither_enable:1; 686 GLuint alpha_test_func:3; 687 GLuint alpha_test_enable:1; 688 GLuint pad1:1; 689 GLuint logic_op_func:4; 690 GLuint logic_op_enable:1; 691 GLuint pad2:1; 692 GLuint write_disable_b:1; 693 GLuint write_disable_g:1; 694 GLuint write_disable_r:1; 695 GLuint write_disable_a:1; 696 GLuint pad3:1; 697 GLuint alpha_to_coverage_dither:1; 698 GLuint alpha_to_one:1; 699 GLuint alpha_to_coverage:1; 700 } blend1; 701}; 702 703struct gen6_color_calc_state 704{ 705 struct { 706 GLuint alpha_test_format:1; 707 GLuint pad0:14; 708 GLuint round_disable:1; 709 GLuint bf_stencil_ref:8; 710 GLuint stencil_ref:8; 711 } cc0; 712 713 union { 714 GLfloat alpha_ref_f; 715 struct { 716 GLuint ui:8; 717 GLuint pad0:24; 718 } alpha_ref_fi; 719 } cc1; 720 721 GLfloat constant_r; 722 GLfloat constant_g; 723 GLfloat constant_b; 724 GLfloat constant_a; 725}; 726 727struct gen6_depth_stencil_state 728{ 729 struct { 730 GLuint pad0:3; 731 GLuint bf_stencil_pass_depth_pass_op:3; 732 GLuint bf_stencil_pass_depth_fail_op:3; 733 GLuint bf_stencil_fail_op:3; 734 GLuint bf_stencil_func:3; 735 GLuint bf_stencil_enable:1; 736 GLuint pad1:2; 737 GLuint stencil_write_enable:1; 738 GLuint stencil_pass_depth_pass_op:3; 739 GLuint stencil_pass_depth_fail_op:3; 740 GLuint stencil_fail_op:3; 741 GLuint stencil_func:3; 742 GLuint stencil_enable:1; 743 } ds0; 744 745 struct { 746 GLuint bf_stencil_write_mask:8; 747 GLuint bf_stencil_test_mask:8; 748 GLuint stencil_write_mask:8; 749 GLuint stencil_test_mask:8; 750 } ds1; 751 752 struct { 753 GLuint pad0:26; 754 GLuint depth_write_enable:1; 755 GLuint depth_test_func:3; 756 GLuint pad1:1; 757 GLuint depth_test_enable:1; 758 } ds2; 759}; 760 761struct brw_cc_unit_state 762{ 763 struct 764 { 765 GLuint pad0:3; 766 GLuint bf_stencil_pass_depth_pass_op:3; 767 GLuint bf_stencil_pass_depth_fail_op:3; 768 GLuint bf_stencil_fail_op:3; 769 GLuint bf_stencil_func:3; 770 GLuint bf_stencil_enable:1; 771 GLuint pad1:2; 772 GLuint stencil_write_enable:1; 773 GLuint stencil_pass_depth_pass_op:3; 774 GLuint stencil_pass_depth_fail_op:3; 775 GLuint stencil_fail_op:3; 776 GLuint stencil_func:3; 777 GLuint stencil_enable:1; 778 } cc0; 779 780 781 struct 782 { 783 GLuint bf_stencil_ref:8; 784 GLuint stencil_write_mask:8; 785 GLuint stencil_test_mask:8; 786 GLuint stencil_ref:8; 787 } cc1; 788 789 790 struct 791 { 792 GLuint logicop_enable:1; 793 GLuint pad0:10; 794 GLuint depth_write_enable:1; 795 GLuint depth_test_function:3; 796 GLuint depth_test:1; 797 GLuint bf_stencil_write_mask:8; 798 GLuint bf_stencil_test_mask:8; 799 } cc2; 800 801 802 struct 803 { 804 GLuint pad0:8; 805 GLuint alpha_test_func:3; 806 GLuint alpha_test:1; 807 GLuint blend_enable:1; 808 GLuint ia_blend_enable:1; 809 GLuint pad1:1; 810 GLuint alpha_test_format:1; 811 GLuint pad2:16; 812 } cc3; 813 814 struct 815 { 816 GLuint pad0:5; 817 GLuint cc_viewport_state_offset:27; /* Offset from GENERAL_STATE_BASE */ 818 } cc4; 819 820 struct 821 { 822 GLuint pad0:2; 823 GLuint ia_dest_blend_factor:5; 824 GLuint ia_src_blend_factor:5; 825 GLuint ia_blend_function:3; 826 GLuint statistics_enable:1; 827 GLuint logicop_func:4; 828 GLuint pad1:11; 829 GLuint dither_enable:1; 830 } cc5; 831 832 struct 833 { 834 GLuint clamp_post_alpha_blend:1; 835 GLuint clamp_pre_alpha_blend:1; 836 GLuint clamp_range:2; 837 GLuint pad0:11; 838 GLuint y_dither_offset:2; 839 GLuint x_dither_offset:2; 840 GLuint dest_blend_factor:5; 841 GLuint src_blend_factor:5; 842 GLuint blend_function:3; 843 } cc6; 844 845 struct { 846 union { 847 GLfloat f; 848 GLubyte ub[4]; 849 } alpha_ref; 850 } cc7; 851}; 852 853struct brw_sf_unit_state 854{ 855 struct thread0 thread0; 856 struct thread1 thread1; 857 struct thread2 thread2; 858 struct thread3 thread3; 859 860 struct 861 { 862 GLuint pad0:10; 863 GLuint stats_enable:1; 864 GLuint nr_urb_entries:7; 865 GLuint pad1:1; 866 GLuint urb_entry_allocation_size:5; 867 GLuint pad2:1; 868 GLuint max_threads:6; 869 GLuint pad3:1; 870 } thread4; 871 872 struct 873 { 874 GLuint front_winding:1; 875 GLuint viewport_transform:1; 876 GLuint pad0:3; 877 GLuint sf_viewport_state_offset:27; /* Offset from GENERAL_STATE_BASE */ 878 } sf5; 879 880 struct 881 { 882 GLuint pad0:9; 883 GLuint dest_org_vbias:4; 884 GLuint dest_org_hbias:4; 885 GLuint scissor:1; 886 GLuint disable_2x2_trifilter:1; 887 GLuint disable_zero_pix_trifilter:1; 888 GLuint point_rast_rule:2; 889 GLuint line_endcap_aa_region_width:2; 890 GLuint line_width:4; 891 GLuint fast_scissor_disable:1; 892 GLuint cull_mode:2; 893 GLuint aa_enable:1; 894 } sf6; 895 896 struct 897 { 898 GLuint point_size:11; 899 GLuint use_point_size_state:1; 900 GLuint subpixel_precision:1; 901 GLuint sprite_point:1; 902 GLuint pad0:10; 903 GLuint aa_line_distance_mode:1; 904 GLuint trifan_pv:2; 905 GLuint linestrip_pv:2; 906 GLuint tristrip_pv:2; 907 GLuint line_last_pixel_enable:1; 908 } sf7; 909 910}; 911 912struct gen6_scissor_rect 913{ 914 GLuint xmin:16; 915 GLuint ymin:16; 916 GLuint xmax:16; 917 GLuint ymax:16; 918}; 919 920struct brw_gs_unit_state 921{ 922 struct thread0 thread0; 923 struct thread1 thread1; 924 struct thread2 thread2; 925 struct thread3 thread3; 926 927 struct 928 { 929 GLuint pad0:8; 930 GLuint rendering_enable:1; /* for Ironlake */ 931 GLuint pad4:1; 932 GLuint stats_enable:1; 933 GLuint nr_urb_entries:7; 934 GLuint pad1:1; 935 GLuint urb_entry_allocation_size:5; 936 GLuint pad2:1; 937 GLuint max_threads:5; 938 GLuint pad3:2; 939 } thread4; 940 941 struct 942 { 943 GLuint sampler_count:3; 944 GLuint pad0:2; 945 GLuint sampler_state_pointer:27; 946 } gs5; 947 948 949 struct 950 { 951 GLuint max_vp_index:4; 952 GLuint pad0:12; 953 GLuint svbi_post_inc_value:10; 954 GLuint pad1:1; 955 GLuint svbi_post_inc_enable:1; 956 GLuint svbi_payload:1; 957 GLuint discard_adjaceny:1; 958 GLuint reorder_enable:1; 959 GLuint pad2:1; 960 } gs6; 961}; 962 963 964struct brw_vs_unit_state 965{ 966 struct thread0 thread0; 967 struct thread1 thread1; 968 struct thread2 thread2; 969 struct thread3 thread3; 970 971 struct 972 { 973 GLuint pad0:10; 974 GLuint stats_enable:1; 975 GLuint nr_urb_entries:7; 976 GLuint pad1:1; 977 GLuint urb_entry_allocation_size:5; 978 GLuint pad2:1; 979 GLuint max_threads:6; 980 GLuint pad3:1; 981 } thread4; 982 983 struct 984 { 985 GLuint sampler_count:3; 986 GLuint pad0:2; 987 GLuint sampler_state_pointer:27; 988 } vs5; 989 990 struct 991 { 992 GLuint vs_enable:1; 993 GLuint vert_cache_disable:1; 994 GLuint pad0:30; 995 } vs6; 996}; 997 998 999struct brw_wm_unit_state 1000{ 1001 struct thread0 thread0; 1002 struct thread1 thread1; 1003 struct thread2 thread2; 1004 struct thread3 thread3; 1005 1006 struct { 1007 GLuint stats_enable:1; 1008 GLuint depth_buffer_clear:1; 1009 GLuint sampler_count:3; 1010 GLuint sampler_state_pointer:27; 1011 } wm4; 1012 1013 struct 1014 { 1015 GLuint enable_8_pix:1; 1016 GLuint enable_16_pix:1; 1017 GLuint enable_32_pix:1; 1018 GLuint enable_con_32_pix:1; 1019 GLuint enable_con_64_pix:1; 1020 GLuint pad0:1; 1021 1022 /* These next four bits are for Ironlake+ */ 1023 GLuint fast_span_coverage_enable:1; 1024 GLuint depth_buffer_clear:1; 1025 GLuint depth_buffer_resolve_enable:1; 1026 GLuint hierarchical_depth_buffer_resolve_enable:1; 1027 1028 GLuint legacy_global_depth_bias:1; 1029 GLuint line_stipple:1; 1030 GLuint depth_offset:1; 1031 GLuint polygon_stipple:1; 1032 GLuint line_aa_region_width:2; 1033 GLuint line_endcap_aa_region_width:2; 1034 GLuint early_depth_test:1; 1035 GLuint thread_dispatch_enable:1; 1036 GLuint program_uses_depth:1; 1037 GLuint program_computes_depth:1; 1038 GLuint program_uses_killpixel:1; 1039 GLuint legacy_line_rast: 1; 1040 GLuint transposed_urb_read_enable:1; 1041 GLuint max_threads:7; 1042 } wm5; 1043 1044 GLfloat global_depth_offset_constant; 1045 GLfloat global_depth_offset_scale; 1046 1047 /* for Ironlake only */ 1048 struct { 1049 GLuint pad0:1; 1050 GLuint grf_reg_count_1:3; 1051 GLuint pad1:2; 1052 GLuint kernel_start_pointer_1:26; 1053 } wm8; 1054 1055 struct { 1056 GLuint pad0:1; 1057 GLuint grf_reg_count_2:3; 1058 GLuint pad1:2; 1059 GLuint kernel_start_pointer_2:26; 1060 } wm9; 1061 1062 struct { 1063 GLuint pad0:1; 1064 GLuint grf_reg_count_3:3; 1065 GLuint pad1:2; 1066 GLuint kernel_start_pointer_3:26; 1067 } wm10; 1068}; 1069 1070struct brw_sampler_default_color { 1071 GLfloat color[4]; 1072}; 1073 1074struct gen5_sampler_default_color { 1075 uint8_t ub[4]; 1076 float f[4]; 1077 uint16_t hf[4]; 1078 uint16_t us[4]; 1079 int16_t s[4]; 1080 uint8_t b[4]; 1081}; 1082 1083struct brw_sampler_state 1084{ 1085 1086 struct 1087 { 1088 GLuint shadow_function:3; 1089 GLuint lod_bias:11; 1090 GLuint min_filter:3; 1091 GLuint mag_filter:3; 1092 GLuint mip_filter:2; 1093 GLuint base_level:5; 1094 GLuint min_mag_neq:1; 1095 GLuint lod_preclamp:1; 1096 GLuint default_color_mode:1; 1097 GLuint pad0:1; 1098 GLuint disable:1; 1099 } ss0; 1100 1101 struct 1102 { 1103 GLuint r_wrap_mode:3; 1104 GLuint t_wrap_mode:3; 1105 GLuint s_wrap_mode:3; 1106 GLuint cube_control_mode:1; 1107 GLuint pad:2; 1108 GLuint max_lod:10; 1109 GLuint min_lod:10; 1110 } ss1; 1111 1112 1113 struct 1114 { 1115 GLuint pad:5; 1116 GLuint default_color_pointer:27; 1117 } ss2; 1118 1119 struct 1120 { 1121 GLuint non_normalized_coord:1; 1122 GLuint pad:12; 1123 GLuint address_round:6; 1124 GLuint max_aniso:3; 1125 GLuint chroma_key_mode:1; 1126 GLuint chroma_key_index:2; 1127 GLuint chroma_key_enable:1; 1128 GLuint monochrome_filter_width:3; 1129 GLuint monochrome_filter_height:3; 1130 } ss3; 1131}; 1132 1133 1134struct brw_clipper_viewport 1135{ 1136 GLfloat xmin; 1137 GLfloat xmax; 1138 GLfloat ymin; 1139 GLfloat ymax; 1140}; 1141 1142struct brw_cc_viewport 1143{ 1144 GLfloat min_depth; 1145 GLfloat max_depth; 1146}; 1147 1148struct brw_sf_viewport 1149{ 1150 struct { 1151 GLfloat m00; 1152 GLfloat m11; 1153 GLfloat m22; 1154 GLfloat m30; 1155 GLfloat m31; 1156 GLfloat m32; 1157 } viewport; 1158 1159 /* scissor coordinates are inclusive */ 1160 struct { 1161 GLshort xmin; 1162 GLshort ymin; 1163 GLshort xmax; 1164 GLshort ymax; 1165 } scissor; 1166}; 1167 1168struct gen6_sf_viewport { 1169 GLfloat m00; 1170 GLfloat m11; 1171 GLfloat m22; 1172 GLfloat m30; 1173 GLfloat m31; 1174 GLfloat m32; 1175}; 1176 1177/* Documented in the subsystem/shared-functions/sampler chapter... 1178 */ 1179struct brw_surface_state 1180{ 1181 struct { 1182 GLuint cube_pos_z:1; 1183 GLuint cube_neg_z:1; 1184 GLuint cube_pos_y:1; 1185 GLuint cube_neg_y:1; 1186 GLuint cube_pos_x:1; 1187 GLuint cube_neg_x:1; 1188 GLuint pad:2; 1189 /* Required on gen6 for surfaces accessed through render cache messages. 1190 */ 1191 GLuint render_cache_read_write:1; 1192 /* Ironlake and newer: instead of replicating one of the texels */ 1193 GLuint cube_corner_average:1; 1194 GLuint mipmap_layout_mode:1; 1195 GLuint vert_line_stride_ofs:1; 1196 GLuint vert_line_stride:1; 1197 GLuint color_blend:1; 1198 GLuint writedisable_blue:1; 1199 GLuint writedisable_green:1; 1200 GLuint writedisable_red:1; 1201 GLuint writedisable_alpha:1; 1202 GLuint surface_format:9; /**< BRW_SURFACEFORMAT_x */ 1203 GLuint data_return_format:1; 1204 GLuint pad0:1; 1205 GLuint surface_type:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */ 1206 } ss0; 1207 1208 struct { 1209 GLuint base_addr; 1210 } ss1; 1211 1212 struct { 1213 GLuint pad:2; 1214 GLuint mip_count:4; 1215 GLuint width:13; 1216 GLuint height:13; 1217 } ss2; 1218 1219 struct { 1220 GLuint tile_walk:1; 1221 GLuint tiled_surface:1; 1222 GLuint pad:1; 1223 GLuint pitch:18; 1224 GLuint depth:11; 1225 } ss3; 1226 1227 struct { 1228 GLuint multisample_position_palette_index:3; 1229 GLuint pad1:1; 1230 GLuint num_multisamples:3; 1231 GLuint pad0:1; 1232 GLuint render_target_view_extent:9; 1233 GLuint min_array_elt:11; 1234 GLuint min_lod:4; 1235 } ss4; 1236 1237 struct { 1238 GLuint pad1:16; 1239 GLuint cache_control:2; 1240 GLuint gfdt:1; 1241 GLuint encrypt:1; 1242 GLuint y_offset:4; 1243 GLuint pad0:1; 1244 GLuint x_offset:7; 1245 } ss5; /* New in G4X */ 1246 1247}; 1248 1249 1250 1251struct brw_vertex_buffer_state 1252{ 1253 struct { 1254 GLuint pitch:11; 1255 GLuint pad:15; 1256 GLuint access_type:1; 1257 GLuint vb_index:5; 1258 } vb0; 1259 1260 GLuint start_addr; 1261 GLuint max_index; 1262#if 1 1263 GLuint instance_data_step_rate; /* not included for sequential/random vertices? */ 1264#endif 1265}; 1266 1267#define BRW_VBP_MAX 17 1268 1269struct brw_vb_array_state { 1270 struct header header; 1271 struct brw_vertex_buffer_state vb[BRW_VBP_MAX]; 1272}; 1273 1274 1275struct brw_vertex_element_state 1276{ 1277 struct 1278 { 1279 GLuint src_offset:11; 1280 GLuint pad:5; 1281 GLuint src_format:9; 1282 GLuint pad0:1; 1283 GLuint valid:1; 1284 GLuint vertex_buffer_index:5; 1285 } ve0; 1286 1287 struct 1288 { 1289 GLuint dst_offset:8; 1290 GLuint pad:8; 1291 GLuint vfcomponent3:4; 1292 GLuint vfcomponent2:4; 1293 GLuint vfcomponent1:4; 1294 GLuint vfcomponent0:4; 1295 } ve1; 1296}; 1297 1298#define BRW_VEP_MAX 18 1299 1300struct brw_vertex_element_packet { 1301 struct header header; 1302 struct brw_vertex_element_state ve[BRW_VEP_MAX]; /* note: less than _TNL_ATTRIB_MAX */ 1303}; 1304 1305 1306struct brw_urb_immediate { 1307 GLuint opcode:4; 1308 GLuint offset:6; 1309 GLuint swizzle_control:2; 1310 GLuint pad:1; 1311 GLuint allocate:1; 1312 GLuint used:1; 1313 GLuint complete:1; 1314 GLuint response_length:4; 1315 GLuint msg_length:4; 1316 GLuint msg_target:4; 1317 GLuint pad1:3; 1318 GLuint end_of_thread:1; 1319}; 1320 1321/* Instruction format for the execution units: 1322 */ 1323 1324struct brw_instruction 1325{ 1326 struct 1327 { 1328 GLuint opcode:7; 1329 GLuint pad:1; 1330 GLuint access_mode:1; 1331 GLuint mask_control:1; 1332 GLuint dependency_control:2; 1333 GLuint compression_control:2; /* gen6: quater control */ 1334 GLuint thread_control:2; 1335 GLuint predicate_control:4; 1336 GLuint predicate_inverse:1; 1337 GLuint execution_size:3; 1338 GLuint destreg__conditionalmod:4; /* destreg - send, conditionalmod - others */ 1339 GLuint acc_wr_control:1; 1340 GLuint cmpt_control:1; 1341 GLuint debug_control:1; 1342 GLuint saturate:1; 1343 } header; 1344 1345 union { 1346 struct 1347 { 1348 GLuint dest_reg_file:2; 1349 GLuint dest_reg_type:3; 1350 GLuint src0_reg_file:2; 1351 GLuint src0_reg_type:3; 1352 GLuint src1_reg_file:2; 1353 GLuint src1_reg_type:3; 1354 GLuint pad:1; 1355 GLuint dest_subreg_nr:5; 1356 GLuint dest_reg_nr:8; 1357 GLuint dest_horiz_stride:2; 1358 GLuint dest_address_mode:1; 1359 } da1; 1360 1361 struct 1362 { 1363 GLuint dest_reg_file:2; 1364 GLuint dest_reg_type:3; 1365 GLuint src0_reg_file:2; 1366 GLuint src0_reg_type:3; 1367 GLuint src1_reg_file:2; /* 0x00000c00 */ 1368 GLuint src1_reg_type:3; /* 0x00007000 */ 1369 GLuint pad:1; 1370 GLint dest_indirect_offset:10; /* offset against the deref'd address reg */ 1371 GLuint dest_subreg_nr:3; /* subnr for the address reg a0.x */ 1372 GLuint dest_horiz_stride:2; 1373 GLuint dest_address_mode:1; 1374 } ia1; 1375 1376 struct 1377 { 1378 GLuint dest_reg_file:2; 1379 GLuint dest_reg_type:3; 1380 GLuint src0_reg_file:2; 1381 GLuint src0_reg_type:3; 1382 GLuint src1_reg_file:2; 1383 GLuint src1_reg_type:3; 1384 GLuint pad:1; 1385 GLuint dest_writemask:4; 1386 GLuint dest_subreg_nr:1; 1387 GLuint dest_reg_nr:8; 1388 GLuint dest_horiz_stride:2; 1389 GLuint dest_address_mode:1; 1390 } da16; 1391 1392 struct 1393 { 1394 GLuint dest_reg_file:2; 1395 GLuint dest_reg_type:3; 1396 GLuint src0_reg_file:2; 1397 GLuint src0_reg_type:3; 1398 GLuint pad0:6; 1399 GLuint dest_writemask:4; 1400 GLint dest_indirect_offset:6; 1401 GLuint dest_subreg_nr:3; 1402 GLuint dest_horiz_stride:2; 1403 GLuint dest_address_mode:1; 1404 } ia16; 1405 1406 struct { 1407 GLuint dest_reg_file:2; 1408 GLuint dest_reg_type:3; 1409 GLuint src0_reg_file:2; 1410 GLuint src0_reg_type:3; 1411 GLuint src1_reg_file:2; 1412 GLuint src1_reg_type:3; 1413 GLuint pad:1; 1414 1415 GLint jump_count:16; 1416 } branch_gen6; 1417 } bits1; 1418 1419 1420 union { 1421 struct 1422 { 1423 GLuint src0_subreg_nr:5; 1424 GLuint src0_reg_nr:8; 1425 GLuint src0_abs:1; 1426 GLuint src0_negate:1; 1427 GLuint src0_address_mode:1; 1428 GLuint src0_horiz_stride:2; 1429 GLuint src0_width:3; 1430 GLuint src0_vert_stride:4; 1431 GLuint flag_reg_nr:1; 1432 GLuint pad:6; 1433 } da1; 1434 1435 struct 1436 { 1437 GLint src0_indirect_offset:10; 1438 GLuint src0_subreg_nr:3; 1439 GLuint src0_abs:1; 1440 GLuint src0_negate:1; 1441 GLuint src0_address_mode:1; 1442 GLuint src0_horiz_stride:2; 1443 GLuint src0_width:3; 1444 GLuint src0_vert_stride:4; 1445 GLuint flag_reg_nr:1; 1446 GLuint pad:6; 1447 } ia1; 1448 1449 struct 1450 { 1451 GLuint src0_swz_x:2; 1452 GLuint src0_swz_y:2; 1453 GLuint src0_subreg_nr:1; 1454 GLuint src0_reg_nr:8; 1455 GLuint src0_abs:1; 1456 GLuint src0_negate:1; 1457 GLuint src0_address_mode:1; 1458 GLuint src0_swz_z:2; 1459 GLuint src0_swz_w:2; 1460 GLuint pad0:1; 1461 GLuint src0_vert_stride:4; 1462 GLuint flag_reg_nr:1; 1463 GLuint pad1:6; 1464 } da16; 1465 1466 struct 1467 { 1468 GLuint src0_swz_x:2; 1469 GLuint src0_swz_y:2; 1470 GLint src0_indirect_offset:6; 1471 GLuint src0_subreg_nr:3; 1472 GLuint src0_abs:1; 1473 GLuint src0_negate:1; 1474 GLuint src0_address_mode:1; 1475 GLuint src0_swz_z:2; 1476 GLuint src0_swz_w:2; 1477 GLuint pad0:1; 1478 GLuint src0_vert_stride:4; 1479 GLuint flag_reg_nr:1; 1480 GLuint pad1:6; 1481 } ia16; 1482 1483 struct 1484 { 1485 GLuint pad:26; 1486 GLuint end_of_thread:1; 1487 GLuint pad1:1; 1488 GLuint sfid:4; 1489 } send_gen5; /* for Ironlake only */ 1490 1491 } bits2; 1492 1493 union 1494 { 1495 struct 1496 { 1497 GLuint src1_subreg_nr:5; 1498 GLuint src1_reg_nr:8; 1499 GLuint src1_abs:1; 1500 GLuint src1_negate:1; 1501 GLuint src1_address_mode:1; 1502 GLuint src1_horiz_stride:2; 1503 GLuint src1_width:3; 1504 GLuint src1_vert_stride:4; 1505 GLuint pad0:7; 1506 } da1; 1507 1508 struct 1509 { 1510 GLuint src1_swz_x:2; 1511 GLuint src1_swz_y:2; 1512 GLuint src1_subreg_nr:1; 1513 GLuint src1_reg_nr:8; 1514 GLuint src1_abs:1; 1515 GLuint src1_negate:1; 1516 GLuint src1_address_mode:1; 1517 GLuint src1_swz_z:2; 1518 GLuint src1_swz_w:2; 1519 GLuint pad1:1; 1520 GLuint src1_vert_stride:4; 1521 GLuint pad2:7; 1522 } da16; 1523 1524 struct 1525 { 1526 GLint src1_indirect_offset:10; 1527 GLuint src1_subreg_nr:3; 1528 GLuint src1_abs:1; 1529 GLuint src1_negate:1; 1530 GLuint src1_address_mode:1; 1531 GLuint src1_horiz_stride:2; 1532 GLuint src1_width:3; 1533 GLuint src1_vert_stride:4; 1534 GLuint flag_reg_nr:1; 1535 GLuint pad1:6; 1536 } ia1; 1537 1538 struct 1539 { 1540 GLuint src1_swz_x:2; 1541 GLuint src1_swz_y:2; 1542 GLint src1_indirect_offset:6; 1543 GLuint src1_subreg_nr:3; 1544 GLuint src1_abs:1; 1545 GLuint src1_negate:1; 1546 GLuint pad0:1; 1547 GLuint src1_swz_z:2; 1548 GLuint src1_swz_w:2; 1549 GLuint pad1:1; 1550 GLuint src1_vert_stride:4; 1551 GLuint flag_reg_nr:1; 1552 GLuint pad2:6; 1553 } ia16; 1554 1555 1556 struct 1557 { 1558 GLint jump_count:16; /* note: signed */ 1559 GLuint pop_count:4; 1560 GLuint pad0:12; 1561 } if_else; 1562 1563 struct 1564 { 1565 /* Signed jump distance to the ip to jump to if all channels 1566 * are disabled after the break or continue. It should point 1567 * to the end of the innermost control flow block, as that's 1568 * where some channel could get re-enabled. 1569 */ 1570 int jip:16; 1571 1572 /* Signed jump distance to the location to resume execution 1573 * of this channel if it's enabled for the break or continue. 1574 */ 1575 int uip:16; 1576 } break_cont; 1577 1578 struct { 1579 GLuint function:4; 1580 GLuint int_type:1; 1581 GLuint precision:1; 1582 GLuint saturate:1; 1583 GLuint data_type:1; 1584 GLuint pad0:8; 1585 GLuint response_length:4; 1586 GLuint msg_length:4; 1587 GLuint msg_target:4; 1588 GLuint pad1:3; 1589 GLuint end_of_thread:1; 1590 } math; 1591 1592 struct { 1593 GLuint function:4; 1594 GLuint int_type:1; 1595 GLuint precision:1; 1596 GLuint saturate:1; 1597 GLuint data_type:1; 1598 GLuint snapshot:1; 1599 GLuint pad0:10; 1600 GLuint header_present:1; 1601 GLuint response_length:5; 1602 GLuint msg_length:4; 1603 GLuint pad1:2; 1604 GLuint end_of_thread:1; 1605 } math_gen5; 1606 1607 struct { 1608 GLuint binding_table_index:8; 1609 GLuint sampler:4; 1610 GLuint return_format:2; 1611 GLuint msg_type:2; 1612 GLuint response_length:4; 1613 GLuint msg_length:4; 1614 GLuint msg_target:4; 1615 GLuint pad1:3; 1616 GLuint end_of_thread:1; 1617 } sampler; 1618 1619 struct { 1620 GLuint binding_table_index:8; 1621 GLuint sampler:4; 1622 GLuint msg_type:4; 1623 GLuint response_length:4; 1624 GLuint msg_length:4; 1625 GLuint msg_target:4; 1626 GLuint pad1:3; 1627 GLuint end_of_thread:1; 1628 } sampler_g4x; 1629 1630 struct { 1631 GLuint binding_table_index:8; 1632 GLuint sampler:4; 1633 GLuint msg_type:4; 1634 GLuint simd_mode:2; 1635 GLuint pad0:1; 1636 GLuint header_present:1; 1637 GLuint response_length:5; 1638 GLuint msg_length:4; 1639 GLuint pad1:2; 1640 GLuint end_of_thread:1; 1641 } sampler_gen5; 1642 1643 struct brw_urb_immediate urb; 1644 1645 struct { 1646 GLuint opcode:4; 1647 GLuint offset:6; 1648 GLuint swizzle_control:2; 1649 GLuint pad:1; 1650 GLuint allocate:1; 1651 GLuint used:1; 1652 GLuint complete:1; 1653 GLuint pad0:3; 1654 GLuint header_present:1; 1655 GLuint response_length:5; 1656 GLuint msg_length:4; 1657 GLuint pad1:2; 1658 GLuint end_of_thread:1; 1659 } urb_gen5; 1660 1661 struct { 1662 GLuint binding_table_index:8; 1663 GLuint msg_control:4; 1664 GLuint msg_type:2; 1665 GLuint target_cache:2; 1666 GLuint response_length:4; 1667 GLuint msg_length:4; 1668 GLuint msg_target:4; 1669 GLuint pad1:3; 1670 GLuint end_of_thread:1; 1671 } dp_read; 1672 1673 struct { 1674 GLuint binding_table_index:8; 1675 GLuint msg_control:3; 1676 GLuint msg_type:3; 1677 GLuint target_cache:2; 1678 GLuint response_length:4; 1679 GLuint msg_length:4; 1680 GLuint msg_target:4; 1681 GLuint pad1:3; 1682 GLuint end_of_thread:1; 1683 } dp_read_g4x; 1684 1685 struct { 1686 GLuint binding_table_index:8; 1687 GLuint msg_control:3; 1688 GLuint msg_type:3; 1689 GLuint target_cache:2; 1690 GLuint pad0:3; 1691 GLuint header_present:1; 1692 GLuint response_length:5; 1693 GLuint msg_length:4; 1694 GLuint pad1:2; 1695 GLuint end_of_thread:1; 1696 } dp_read_gen5; 1697 1698 struct { 1699 GLuint binding_table_index:8; 1700 GLuint msg_control:3; 1701 GLuint pixel_scoreboard_clear:1; 1702 GLuint msg_type:3; 1703 GLuint send_commit_msg:1; 1704 GLuint response_length:4; 1705 GLuint msg_length:4; 1706 GLuint msg_target:4; 1707 GLuint pad1:3; 1708 GLuint end_of_thread:1; 1709 } dp_write; 1710 1711 struct { 1712 GLuint binding_table_index:8; 1713 GLuint msg_control:3; 1714 GLuint pixel_scoreboard_clear:1; 1715 GLuint msg_type:3; 1716 GLuint send_commit_msg:1; 1717 GLuint pad0:3; 1718 GLuint header_present:1; 1719 GLuint response_length:5; 1720 GLuint msg_length:4; 1721 GLuint pad1:2; 1722 GLuint end_of_thread:1; 1723 } dp_write_gen5; 1724 1725 /* Sandybridge DP for sample cache, constant cache, render cache */ 1726 struct { 1727 GLuint binding_table_index:8; 1728 GLuint msg_control:5; 1729 GLuint msg_type:3; 1730 GLuint pad0:3; 1731 GLuint header_present:1; 1732 GLuint response_length:5; 1733 GLuint msg_length:4; 1734 GLuint pad1:2; 1735 GLuint end_of_thread:1; 1736 } dp_sampler_const_cache; 1737 1738 struct { 1739 GLuint binding_table_index:8; 1740 GLuint msg_control:3; 1741 GLuint slot_group_select:1; 1742 GLuint pixel_scoreboard_clear:1; 1743 GLuint msg_type:4; 1744 GLuint send_commit_msg:1; 1745 GLuint pad0:1; 1746 GLuint header_present:1; 1747 GLuint response_length:5; 1748 GLuint msg_length:4; 1749 GLuint pad1:2; 1750 GLuint end_of_thread:1; 1751 } dp_render_cache; 1752 1753 struct { 1754 GLuint function_control:16; 1755 GLuint response_length:4; 1756 GLuint msg_length:4; 1757 GLuint msg_target:4; 1758 GLuint pad1:3; 1759 GLuint end_of_thread:1; 1760 } generic; 1761 1762 /* Of this struct, only end_of_thread is not present for gen6. */ 1763 struct { 1764 GLuint function_control:19; 1765 GLuint header_present:1; 1766 GLuint response_length:5; 1767 GLuint msg_length:4; 1768 GLuint pad1:2; 1769 GLuint end_of_thread:1; 1770 } generic_gen5; 1771 1772 GLint d; 1773 GLuint ud; 1774 float f; 1775 } bits3; 1776}; 1777 1778 1779#endif 1780