mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
radeon: cleanup compile defines mess.
I inherited this and really it stayed around far too long, make it nice and simple.
This commit is contained in:
parent
a6a21eb00d
commit
858a2a2ac7
9 changed files with 67 additions and 88 deletions
|
|
@ -55,8 +55,7 @@ C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
|
|||
|
||||
X86_SOURCES =
|
||||
|
||||
DRIVER_DEFINES = -DRADEON_COMMON=1 -DRADEON_COMMON_FOR_R200 \
|
||||
-Wall
|
||||
DRIVER_DEFINES = -DRADEON_R200 -Wall
|
||||
|
||||
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,7 @@ DRIVER_SOURCES = \
|
|||
|
||||
C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_DEFINES = -DCOMPILE_R300 -DR200_MERGED=0 \
|
||||
-DRADEON_COMMON=1 -DRADEON_COMMON_FOR_R300 \
|
||||
DRIVER_DEFINES = -DRADEON_R300
|
||||
# -DRADEON_BO_TRACK \
|
||||
-Wall
|
||||
|
||||
|
|
|
|||
|
|
@ -51,26 +51,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include "radeon_screen.h"
|
||||
|
||||
#if R200_MERGED
|
||||
extern void radeonFallback(GLcontext * ctx, GLuint bit, GLboolean mode);
|
||||
|
||||
#define FALLBACK( radeon, bit, mode ) do { \
|
||||
if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \
|
||||
__FUNCTION__, bit, mode ); \
|
||||
radeonFallback( (radeon)->glCtx, bit, mode ); \
|
||||
} while (0)
|
||||
#else
|
||||
#define FALLBACK( radeon, bit, mode ) fprintf(stderr, "%s:%s\n", __LINE__, __FILE__);
|
||||
#endif
|
||||
|
||||
/* TCL fallbacks */
|
||||
extern void radeonTclFallback(GLcontext * ctx, GLuint bit, GLboolean mode);
|
||||
|
||||
#if R200_MERGED
|
||||
#define TCL_FALLBACK( ctx, bit, mode ) radeonTclFallback( ctx, bit, mode )
|
||||
#else
|
||||
#define TCL_FALLBACK( ctx, bit, mode ) ;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __RADEON_CONTEXT_H__ */
|
||||
|
|
|
|||
|
|
@ -65,8 +65,7 @@ DRIVER_SOURCES = \
|
|||
|
||||
C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
|
||||
|
||||
DRIVER_DEFINES = -DCOMPILE_R600 -DR200_MERGED=0 \
|
||||
-DRADEON_COMMON=1 -DRADEON_COMMON_FOR_R600 \
|
||||
DRIVER_DEFINES = -DRADEON_R600 \
|
||||
# -DRADEON_BO_TRACK \
|
||||
-Wall
|
||||
|
||||
|
|
|
|||
|
|
@ -385,9 +385,6 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
|
|||
|
||||
if (driQueryOptionb(&r600->radeon.optionCache, "no_rast")) {
|
||||
radeon_warning("disabling 3D acceleration\n");
|
||||
#if R200_MERGED
|
||||
FALLBACK(&r600->radeon, RADEON_FALLBACK_DISABLE, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ C_SOURCES = \
|
|||
$(DRIVER_SOURCES) \
|
||||
$(CS_SOURCES)
|
||||
|
||||
DRIVER_DEFINES = -DRADEON_COMMON=0 \
|
||||
-Wall
|
||||
DRIVER_DEFINES = -DRADEON_R100 -Wall
|
||||
|
||||
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600) /* +r6/r7 */
|
||||
#if defined(RADEON_R600)
|
||||
#include "r600_context.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -48,17 +48,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "radeon_screen.h"
|
||||
#include "radeon_common.h"
|
||||
#include "radeon_span.h"
|
||||
#if !RADEON_COMMON
|
||||
#if defined(RADEON_R100)
|
||||
#include "radeon_context.h"
|
||||
#include "radeon_tex.h"
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#include "r200_context.h"
|
||||
#include "r200_ioctl.h"
|
||||
#include "r200_tex.h"
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#elif defined(RADEON_R300)
|
||||
#include "r300_context.h"
|
||||
#include "r300_tex.h"
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#include "r600_context.h"
|
||||
#include "r700_driconf.h" /* +r6/r7 */
|
||||
#include "r600_tex.h" /* +r6/r7 */
|
||||
|
|
@ -82,7 +82,7 @@ DRI_CONF_OPT_BEGIN_V(command_buffer_size,int,def, # min ":" # max ) \
|
|||
DRI_CONF_DESC(de,"Grösse des Befehlspuffers (in KB)") \
|
||||
DRI_CONF_OPT_END
|
||||
|
||||
#if !RADEON_COMMON /* R100 */
|
||||
#if defined(RADEON_R100) /* R100 */
|
||||
PUBLIC const char __driConfigOptions[] =
|
||||
DRI_CONF_BEGIN
|
||||
DRI_CONF_SECTION_PERFORMANCE
|
||||
|
|
@ -109,7 +109,7 @@ DRI_CONF_BEGIN
|
|||
DRI_CONF_END;
|
||||
static const GLuint __driNConfigOptions = 15;
|
||||
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
|
||||
PUBLIC const char __driConfigOptions[] =
|
||||
DRI_CONF_BEGIN
|
||||
|
|
@ -147,7 +147,7 @@ extern const struct dri_extension NV_vp_extension[];
|
|||
extern const struct dri_extension ATI_fs_extension[];
|
||||
extern const struct dri_extension point_extensions[];
|
||||
|
||||
#elif RADEON_COMMON && (defined(RADEON_COMMON_FOR_R300) || defined(RADEON_COMMON_FOR_R600))
|
||||
#elif defined(RADEON_R300) || defined(RADEON_R600)
|
||||
|
||||
#define DRI_CONF_FP_OPTIMIZATION_SPEED 0
|
||||
#define DRI_CONF_FP_OPTIMIZATION_QUALITY 1
|
||||
|
|
@ -220,7 +220,7 @@ static const GLuint __driNConfigOptions = 17;
|
|||
|
||||
extern const struct dri_extension gl_20_extension[];
|
||||
|
||||
#endif /* RADEON_COMMON && defined(RADEON_COMMON_FOR_R300) */
|
||||
#endif
|
||||
|
||||
extern const struct dri_extension card_extensions[];
|
||||
extern const struct dri_extension mm_extensions[];
|
||||
|
|
@ -337,7 +337,7 @@ radeonFillInModes( __DRIscreenPrivate *psp,
|
|||
return (const __DRIconfig **) configs;
|
||||
}
|
||||
|
||||
#if !RADEON_COMMON
|
||||
#if defined(RADEON_R100)
|
||||
static const __DRItexOffsetExtension radeonTexOffsetExtension = {
|
||||
{ __DRI_TEX_OFFSET, __DRI_TEX_OFFSET_VERSION },
|
||||
radeonSetTexOffset,
|
||||
|
|
@ -350,7 +350,7 @@ static const __DRItexBufferExtension radeonTexBufferExtension = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
static const __DRIallocateExtension r200AllocateExtension = {
|
||||
{ __DRI_ALLOCATE, __DRI_ALLOCATE_VERSION },
|
||||
r200AllocateMemoryMESA,
|
||||
|
|
@ -370,7 +370,7 @@ static const __DRItexBufferExtension r200TexBufferExtension = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#if defined(RADEON_R300)
|
||||
static const __DRItexOffsetExtension r300texOffsetExtension = {
|
||||
{ __DRI_TEX_OFFSET, __DRI_TEX_OFFSET_VERSION },
|
||||
r300SetTexOffset,
|
||||
|
|
@ -383,7 +383,7 @@ static const __DRItexBufferExtension r300TexBufferExtension = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
static const __DRItexOffsetExtension r600texOffsetExtension = {
|
||||
{ __DRI_TEX_OFFSET, __DRI_TEX_OFFSET_VERSION },
|
||||
r600SetTexOffset, /* +r6/r7 */
|
||||
|
|
@ -1222,22 +1222,22 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
|
|||
screen->extensions[i++] = &driMediaStreamCounterExtension.base;
|
||||
}
|
||||
|
||||
#if !RADEON_COMMON
|
||||
#if defined(RADEON_R100)
|
||||
screen->extensions[i++] = &radeonTexOffsetExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
if (IS_R200_CLASS(screen))
|
||||
screen->extensions[i++] = &r200AllocateExtension.base;
|
||||
|
||||
screen->extensions[i++] = &r200texOffsetExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#if defined(RADEON_R300)
|
||||
screen->extensions[i++] = &r300texOffsetExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
screen->extensions[i++] = &r600texOffsetExtension.base;
|
||||
#endif
|
||||
|
||||
|
|
@ -1376,22 +1376,22 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
|
|||
screen->extensions[i++] = &driMediaStreamCounterExtension.base;
|
||||
}
|
||||
|
||||
#if !RADEON_COMMON
|
||||
#if defined(RADEON_R100)
|
||||
screen->extensions[i++] = &radeonTexBufferExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
if (IS_R200_CLASS(screen))
|
||||
screen->extensions[i++] = &r200AllocateExtension.base;
|
||||
|
||||
screen->extensions[i++] = &r200TexBufferExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#if defined(RADEON_R300)
|
||||
screen->extensions[i++] = &r300TexBufferExtension.base;
|
||||
#endif
|
||||
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
screen->extensions[i++] = &r600TexBufferExtension.base;
|
||||
#endif
|
||||
|
||||
|
|
@ -1589,22 +1589,22 @@ radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
|
|||
static const __DRIconfig **
|
||||
radeonInitScreen(__DRIscreenPrivate *psp)
|
||||
{
|
||||
#if !RADEON_COMMON
|
||||
#if defined(RADEON_R100)
|
||||
static const char *driver_name = "Radeon";
|
||||
static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
static const __DRIversion drm_expected = { 1, 6, 0 };
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
static const char *driver_name = "R200";
|
||||
static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
static const __DRIversion drm_expected = { 1, 6, 0 };
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#elif defined(RADEON_R300)
|
||||
static const char *driver_name = "R300";
|
||||
static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
static const __DRIversion drm_expected = { 1, 24, 0 };
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
static const char *driver_name = "R600";
|
||||
static const __DRIutilversion2 ddx_expected = { 4, 5, 0, 0 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
|
|
@ -1630,13 +1630,13 @@ radeonInitScreen(__DRIscreenPrivate *psp)
|
|||
* Hello chicken. Hello egg. How are you two today?
|
||||
*/
|
||||
driInitExtensions( NULL, card_extensions, GL_FALSE );
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
driInitExtensions( NULL, blend_extensions, GL_FALSE );
|
||||
driInitSingleExtension( NULL, ARB_vp_extension );
|
||||
driInitSingleExtension( NULL, NV_vp_extension );
|
||||
driInitSingleExtension( NULL, ATI_fs_extension );
|
||||
driInitExtensions( NULL, point_extensions, GL_FALSE );
|
||||
#elif (defined(RADEON_COMMON_FOR_R300) || defined(RADEON_COMMON_FOR_R600))
|
||||
#elif (defined(RADEON_R300) || defined(RADEON_R600))
|
||||
driInitSingleExtension( NULL, gl_20_extension );
|
||||
#endif
|
||||
|
||||
|
|
@ -1684,13 +1684,13 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp)
|
|||
*/
|
||||
driInitExtensions( NULL, card_extensions, GL_FALSE );
|
||||
driInitExtensions( NULL, mm_extensions, GL_FALSE );
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
driInitExtensions( NULL, blend_extensions, GL_FALSE );
|
||||
driInitSingleExtension( NULL, ARB_vp_extension );
|
||||
driInitSingleExtension( NULL, NV_vp_extension );
|
||||
driInitSingleExtension( NULL, ATI_fs_extension );
|
||||
driInitExtensions( NULL, point_extensions, GL_FALSE );
|
||||
#elif (defined(RADEON_COMMON_FOR_R300) || defined(RADEON_COMMON_FOR_R600))
|
||||
#elif (defined(RADEON_R300) || defined(RADEON_R600))
|
||||
driInitSingleExtension( NULL, gl_20_extension );
|
||||
#endif
|
||||
|
||||
|
|
@ -1772,13 +1772,13 @@ getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo )
|
|||
const struct __DriverAPIRec driDriverAPI = {
|
||||
.InitScreen = radeonInitScreen,
|
||||
.DestroyScreen = radeonDestroyScreen,
|
||||
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
.CreateContext = r200CreateContext,
|
||||
.DestroyContext = r200DestroyContext,
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
.CreateContext = r600CreateContext,
|
||||
.DestroyContext = radeonDestroyContext,
|
||||
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
|
||||
#elif defined(RADEON_R300)
|
||||
.CreateContext = r300CreateContext,
|
||||
.DestroyContext = radeonDestroyContext,
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb);
|
|||
/* r200 depth buffer is always tiled - this is the formula
|
||||
according to the docs unless I typo'ed in it
|
||||
*/
|
||||
#if defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
static GLubyte *r200_depth_2byte(const struct radeon_renderbuffer * rrb,
|
||||
GLint x, GLint y)
|
||||
{
|
||||
|
|
@ -112,7 +112,7 @@ static GLubyte *r200_depth_4byte(const struct radeon_renderbuffer * rrb,
|
|||
* - 2D (akin to macro-tiled/micro-tiled on older asics)
|
||||
* only 1D tiling is implemented below
|
||||
*/
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
static inline GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb,
|
||||
GLint x, GLint y, GLint is_depth, GLint is_stencil)
|
||||
{
|
||||
|
|
@ -334,8 +334,8 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef COMPILE_R300
|
||||
#ifndef COMPILE_R600
|
||||
#ifndef RADEON_R300
|
||||
#ifndef RADEON_R600
|
||||
static uint32_t
|
||||
z24s8_to_s8z24(uint32_t val)
|
||||
{
|
||||
|
|
@ -409,7 +409,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
|
||||
#define TAG(x) radeon##x##_RGB565
|
||||
#define TAG2(x,y) radeon##x##_RGB565##y
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
|
||||
#else
|
||||
#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
|
||||
|
|
@ -423,7 +423,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
|
||||
#define TAG(x) radeon##x##_ARGB1555
|
||||
#define TAG2(x,y) radeon##x##_ARGB1555##y
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
|
||||
#else
|
||||
#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
|
||||
|
|
@ -437,7 +437,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
|
||||
#define TAG(x) radeon##x##_ARGB4444
|
||||
#define TAG2(x,y) radeon##x##_ARGB4444##y
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
|
||||
#else
|
||||
#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
|
||||
|
|
@ -451,7 +451,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
|
||||
#define TAG(x) radeon##x##_xRGB8888
|
||||
#define TAG2(x,y) radeon##x##_xRGB8888##y
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
#define GET_VALUE(_x, _y) ((*(GLuint*)(r600_ptr_color(rrb, _x + x_off, _y + y_off)) | 0xff000000))
|
||||
#define PUT_VALUE(_x, _y, d) { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_color( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -473,7 +473,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
|
||||
#define TAG(x) radeon##x##_ARGB8888
|
||||
#define TAG2(x,y) radeon##x##_ARGB8888##y
|
||||
#if defined(RADEON_COMMON_FOR_R600)
|
||||
#if defined(RADEON_R600)
|
||||
#define GET_VALUE(_x, _y) (*(GLuint*)(r600_ptr_color(rrb, _x + x_off, _y + y_off)))
|
||||
#define PUT_VALUE(_x, _y, d) { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_color( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -506,10 +506,10 @@ s8z24_to_z24s8(uint32_t val)
|
|||
*/
|
||||
#define VALUE_TYPE GLushort
|
||||
|
||||
#if defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
*(GLushort *)r200_depth_2byte(rrb, _x + x_off, _y + y_off) = d
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
*(GLushort *)r600_ptr_depth(rrb, _x + x_off, _y + y_off) = d
|
||||
#else
|
||||
|
|
@ -517,10 +517,10 @@ s8z24_to_z24s8(uint32_t val)
|
|||
*(GLushort *)radeon_ptr_2byte_8x2(rrb, _x + x_off, _y + y_off) = d
|
||||
#endif
|
||||
|
||||
#if defined(RADEON_COMMON_FOR_R200)
|
||||
#if defined(RADEON_R200)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
d = *(GLushort *)r200_depth_2byte(rrb, _x + x_off, _y + y_off)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
d = *(GLushort *)r600_ptr_depth(rrb, _x + x_off, _y + y_off)
|
||||
#else
|
||||
|
|
@ -538,7 +538,7 @@ s8z24_to_z24s8(uint32_t val)
|
|||
*/
|
||||
#define VALUE_TYPE GLuint
|
||||
|
||||
#if defined(COMPILE_R300)
|
||||
#if defined(RADEON_R300)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -547,7 +547,7 @@ do { \
|
|||
tmp |= ((d << 8) & 0xffffff00); \
|
||||
*_ptr = tmp; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_depth( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -556,7 +556,7 @@ do { \
|
|||
tmp |= ((d) & 0x00ffffff); \
|
||||
*_ptr = tmp; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -576,17 +576,17 @@ do { \
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#if defined(COMPILE_R300)
|
||||
#if defined(RADEON_R300)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) & 0xffffff00) >> 8; \
|
||||
}while(0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = (*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off)) & 0x00ffffff); \
|
||||
}while(0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = *(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off)) & 0x00ffffff; \
|
||||
|
|
@ -607,13 +607,13 @@ do { \
|
|||
*/
|
||||
#define VALUE_TYPE GLuint
|
||||
|
||||
#if defined(COMPILE_R300)
|
||||
#if defined(RADEON_R300)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
*_ptr = d; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_depth( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -627,7 +627,7 @@ do { \
|
|||
tmp |= (d) & 0xff; \
|
||||
*_ptr = tmp; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define WRITE_DEPTH( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
@ -643,18 +643,18 @@ do { \
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#if defined(COMPILE_R300)
|
||||
#if defined(RADEON_R300)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))); \
|
||||
}while(0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = ((*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off))) << 8) & 0xffffff00; \
|
||||
d |= (*(GLuint*)(r600_ptr_stencil(rrb, _x + x_off, _y + y_off))) & 0x000000ff; \
|
||||
}while(0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define READ_DEPTH( d, _x, _y ) \
|
||||
do { \
|
||||
d = s8z24_to_z24s8(*(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off))); \
|
||||
|
|
@ -674,7 +674,7 @@ do { \
|
|||
|
||||
/* 24 bit depth, 8 bit stencil depthbuffer functions
|
||||
*/
|
||||
#ifdef COMPILE_R300
|
||||
#ifdef RADEON_R300
|
||||
#define WRITE_STENCIL( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)radeon_ptr_4byte(rrb, _x + x_off, _y + y_off); \
|
||||
|
|
@ -683,7 +683,7 @@ do { \
|
|||
tmp |= (d) & 0xff; \
|
||||
*_ptr = tmp; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define WRITE_STENCIL( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_stencil(rrb, _x + x_off, _y + y_off); \
|
||||
|
|
@ -692,7 +692,7 @@ do { \
|
|||
tmp |= (d) & 0xff; \
|
||||
*_ptr = tmp; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define WRITE_STENCIL( _x, _y, d ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r200_depth_4byte(rrb, _x + x_off, _y + y_off); \
|
||||
|
|
@ -712,21 +712,21 @@ do { \
|
|||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_R300
|
||||
#ifdef RADEON_R300
|
||||
#define READ_STENCIL( d, _x, _y ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
GLuint tmp = *_ptr; \
|
||||
d = tmp & 0x000000ff; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R600)
|
||||
#elif defined(RADEON_R600)
|
||||
#define READ_STENCIL( d, _x, _y ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r600_ptr_stencil( rrb, _x + x_off, _y + y_off ); \
|
||||
GLuint tmp = *_ptr; \
|
||||
d = tmp & 0x000000ff; \
|
||||
} while (0)
|
||||
#elif defined(RADEON_COMMON_FOR_R200)
|
||||
#elif defined(RADEON_R200)
|
||||
#define READ_STENCIL( d, _x, _y ) \
|
||||
do { \
|
||||
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue