r300_reg.h (190831) | r300_reg.h (215034) |
---|---|
1/************************************************************************** 2 3Copyright (C) 2004-2005 Nicolai Haehnle et al. 4 5Permission is hereby granted, free of charge, to any person obtaining a 6copy of this software and associated documentation files (the "Software"), 7to deal in the Software without restriction, including without limitation 8on the rights to use, copy, modify, merge, publish, distribute, sub --- 10 unchanged lines hidden (view full) --- 19THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 20DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 22USE OR OTHER DEALINGS IN THE SOFTWARE. 23 24**************************************************************************/ 25 26#include <sys/cdefs.h> | 1/************************************************************************** 2 3Copyright (C) 2004-2005 Nicolai Haehnle et al. 4 5Permission is hereby granted, free of charge, to any person obtaining a 6copy of this software and associated documentation files (the "Software"), 7to deal in the Software without restriction, including without limitation 8on the rights to use, copy, modify, merge, publish, distribute, sub --- 10 unchanged lines hidden (view full) --- 19THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 20DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 22USE OR OTHER DEALINGS IN THE SOFTWARE. 23 24**************************************************************************/ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/dev/drm/r300_reg.h 190831 2009-04-07 22:20:58Z rnoland $"); | 27__FBSDID("$FreeBSD: head/sys/dev/drm/r300_reg.h 215034 2010-11-09 10:59:09Z brucec $"); |
28 29/* *INDENT-OFF* */ 30 31#ifndef _R300_REG_H 32#define _R300_REG_H 33 34#define R300_MC_INIT_MISC_LAT_TIMER 0x180 35# define R300_MC_MISC__MC_CPR_INIT_LAT_SHIFT 0 --- 304 unchanged lines hidden (view full) --- 340 * experiments so far have shown that both *must* point to an instruction 341 * inside the vertex program, otherwise the GPU locks up. 342 * 343 * fglrx usually sets CNTL_3_UNKNOWN to the end of the program and 344 * R300_PVS_CNTL_1_POS_END_SHIFT points to instruction where last write to 345 * position takes place. 346 * 347 * Most likely this is used to ignore rest of the program in cases | 28 29/* *INDENT-OFF* */ 30 31#ifndef _R300_REG_H 32#define _R300_REG_H 33 34#define R300_MC_INIT_MISC_LAT_TIMER 0x180 35# define R300_MC_MISC__MC_CPR_INIT_LAT_SHIFT 0 --- 304 unchanged lines hidden (view full) --- 340 * experiments so far have shown that both *must* point to an instruction 341 * inside the vertex program, otherwise the GPU locks up. 342 * 343 * fglrx usually sets CNTL_3_UNKNOWN to the end of the program and 344 * R300_PVS_CNTL_1_POS_END_SHIFT points to instruction where last write to 345 * position takes place. 346 * 347 * Most likely this is used to ignore rest of the program in cases |
348 * where group of verts arent visible. For some reason this "section" | 348 * where group of verts aren't visible. For some reason this "section" |
349 * is sometimes accepted other instruction that have no relationship with 350 * position calculations. 351 */ 352#define R300_VAP_PVS_CNTL_1 0x22D0 353# define R300_PVS_CNTL_1_PROGRAM_START_SHIFT 0 354# define R300_PVS_CNTL_1_POS_END_SHIFT 10 355# define R300_PVS_CNTL_1_PROGRAM_END_SHIFT 20 356/* Addresses are relative the the vertex program parameters area. */ --- 228 unchanged lines hidden (view full) --- 585# define R300_PM_BACK_LINE (1 << 7) 586# define R300_PM_BACK_FILL (1 << 8) 587 588/* Fog parameters */ 589#define R300_RE_FOG_SCALE 0x4294 590#define R300_RE_FOG_START 0x4298 591 592/* Not sure why there are duplicate of factor and constant values. | 349 * is sometimes accepted other instruction that have no relationship with 350 * position calculations. 351 */ 352#define R300_VAP_PVS_CNTL_1 0x22D0 353# define R300_PVS_CNTL_1_PROGRAM_START_SHIFT 0 354# define R300_PVS_CNTL_1_POS_END_SHIFT 10 355# define R300_PVS_CNTL_1_PROGRAM_END_SHIFT 20 356/* Addresses are relative the the vertex program parameters area. */ --- 228 unchanged lines hidden (view full) --- 585# define R300_PM_BACK_LINE (1 << 7) 586# define R300_PM_BACK_FILL (1 << 8) 587 588/* Fog parameters */ 589#define R300_RE_FOG_SCALE 0x4294 590#define R300_RE_FOG_START 0x4298 591 592/* Not sure why there are duplicate of factor and constant values. |
593 * My best guess so far is that there are seperate zbiases for test and write. | 593 * My best guess so far is that there are separate zbiases for test and write. |
594 * Ordering might be wrong. 595 * Some of the tests indicate that fgl has a fallback implementation of zbias 596 * via pixel shaders. 597 */ 598#define R300_RE_ZBIAS_CNTL 0x42A0 /* GUESS */ 599#define R300_RE_ZBIAS_T_FACTOR 0x42A4 600#define R300_RE_ZBIAS_T_CONSTANT 0x42A8 601#define R300_RE_ZBIAS_W_FACTOR 0x42AC 602#define R300_RE_ZBIAS_W_CONSTANT 0x42B0 603 604/* This register needs to be set to (1<<1) for RV350 to correctly 605 * perform depth test (see --vb-triangles in r300_demo) 606 * Don't know about other chips. - Vladimir 607 * This is set to 3 when GL_POLYGON_OFFSET_FILL is on. 608 * My guess is that there are two bits for each zbias primitive 609 * (FILL, LINE, POINT). 610 * One to enable depth test and one for depth write. | 594 * Ordering might be wrong. 595 * Some of the tests indicate that fgl has a fallback implementation of zbias 596 * via pixel shaders. 597 */ 598#define R300_RE_ZBIAS_CNTL 0x42A0 /* GUESS */ 599#define R300_RE_ZBIAS_T_FACTOR 0x42A4 600#define R300_RE_ZBIAS_T_CONSTANT 0x42A8 601#define R300_RE_ZBIAS_W_FACTOR 0x42AC 602#define R300_RE_ZBIAS_W_CONSTANT 0x42B0 603 604/* This register needs to be set to (1<<1) for RV350 to correctly 605 * perform depth test (see --vb-triangles in r300_demo) 606 * Don't know about other chips. - Vladimir 607 * This is set to 3 when GL_POLYGON_OFFSET_FILL is on. 608 * My guess is that there are two bits for each zbias primitive 609 * (FILL, LINE, POINT). 610 * One to enable depth test and one for depth write. |
611 * Yet this doesnt explain why depth writes work ... | 611 * Yet this doesn't explain why depth writes work ... |
612 */ 613#define R300_RE_OCCLUSION_CNTL 0x42B4 614# define R300_OCCLUSION_ON (1<<1) 615 616#define R300_RE_CULL_CNTL 0x42B8 617# define R300_CULL_FRONT (1 << 0) 618# define R300_CULL_BACK (1 << 1) 619# define R300_FRONT_FACE_CCW (0 << 2) --- 68 unchanged lines hidden (view full) --- 688# define R300_RS_ROUTE_ENABLE (1 << 3) /* GUESS */ 689# define R300_RS_ROUTE_DEST_SHIFT 6 690# define R300_RS_ROUTE_DEST_MASK (31 << 6) /* GUESS */ 691 692/* Special handling for color: When the fragment program uses color, 693 * the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the 694 * color register index. 695 * | 612 */ 613#define R300_RE_OCCLUSION_CNTL 0x42B4 614# define R300_OCCLUSION_ON (1<<1) 615 616#define R300_RE_CULL_CNTL 0x42B8 617# define R300_CULL_FRONT (1 << 0) 618# define R300_CULL_BACK (1 << 1) 619# define R300_FRONT_FACE_CCW (0 << 2) --- 68 unchanged lines hidden (view full) --- 688# define R300_RS_ROUTE_ENABLE (1 << 3) /* GUESS */ 689# define R300_RS_ROUTE_DEST_SHIFT 6 690# define R300_RS_ROUTE_DEST_MASK (31 << 6) /* GUESS */ 691 692/* Special handling for color: When the fragment program uses color, 693 * the ROUTE_0_COLOR bit is set and ROUTE_0_COLOR_DEST contains the 694 * color register index. 695 * |
696 * Apperently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any | 696 * Apparently you may set the R300_RS_ROUTE_0_COLOR bit, but not provide any |
697 * R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state. 698 * See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly 699 * correct or not. - Oliver. 700 */ 701# define R300_RS_ROUTE_0_COLOR (1 << 14) 702# define R300_RS_ROUTE_0_COLOR_DEST_SHIFT 17 703# define R300_RS_ROUTE_0_COLOR_DEST_MASK (31 << 17) /* GUESS */ 704/* As above, but for secondary color */ --- 107 unchanged lines hidden (view full) --- 812# define R300_TX_MAG_FILTER_MASK (3 << 9) 813# define R300_TX_MIN_FILTER_NEAREST (1 << 11) 814# define R300_TX_MIN_FILTER_LINEAR (2 << 11) 815# define R300_TX_MIN_FILTER_NEAREST_MIP_NEAREST (5 << 11) 816# define R300_TX_MIN_FILTER_NEAREST_MIP_LINEAR (9 << 11) 817# define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) 818# define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) 819 | 697 * R300_RS_ROUTE_0_COLOR_DEST value; this setup is used for clearing the state. 698 * See r300_ioctl.c:r300EmitClearState. I'm not sure if this setup is strictly 699 * correct or not. - Oliver. 700 */ 701# define R300_RS_ROUTE_0_COLOR (1 << 14) 702# define R300_RS_ROUTE_0_COLOR_DEST_SHIFT 17 703# define R300_RS_ROUTE_0_COLOR_DEST_MASK (31 << 17) /* GUESS */ 704/* As above, but for secondary color */ --- 107 unchanged lines hidden (view full) --- 812# define R300_TX_MAG_FILTER_MASK (3 << 9) 813# define R300_TX_MIN_FILTER_NEAREST (1 << 11) 814# define R300_TX_MIN_FILTER_LINEAR (2 << 11) 815# define R300_TX_MIN_FILTER_NEAREST_MIP_NEAREST (5 << 11) 816# define R300_TX_MIN_FILTER_NEAREST_MIP_LINEAR (9 << 11) 817# define R300_TX_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 11) 818# define R300_TX_MIN_FILTER_LINEAR_MIP_LINEAR (10 << 11) 819 |
820/* NOTE: NEAREST doesnt seem to exist. 821 * Im not seting MAG_FILTER_MASK and (3 << 11) on for all | 820/* NOTE: NEAREST doesn't seem to exist. 821 * I'm not setting MAG_FILTER_MASK and (3 << 11) on for all |
822 * anisotropy modes because that would void selected mag filter 823 */ 824# define R300_TX_MIN_FILTER_ANISO_NEAREST (0 << 13) 825# define R300_TX_MIN_FILTER_ANISO_LINEAR (0 << 13) 826# define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (1 << 13) 827# define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (2 << 13) 828# define R300_TX_MIN_FILTER_MASK ( (15 << 11) | (3 << 13) ) 829# define R300_TX_MAX_ANISO_1_TO_1 (0 << 21) --- 957 unchanged lines hidden --- | 822 * anisotropy modes because that would void selected mag filter 823 */ 824# define R300_TX_MIN_FILTER_ANISO_NEAREST (0 << 13) 825# define R300_TX_MIN_FILTER_ANISO_LINEAR (0 << 13) 826# define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (1 << 13) 827# define R300_TX_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (2 << 13) 828# define R300_TX_MIN_FILTER_MASK ( (15 << 11) | (3 << 13) ) 829# define R300_TX_MAX_ANISO_1_TO_1 (0 << 21) --- 957 unchanged lines hidden --- |