break;
case 2:
- if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT))
+ if (rws->get_value(rws, R300_VID_DRM_2_1_0))
microtile = R300_BUFFER_SQUARETILED;
break;
}
break;
case 2:
- if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT)) {
+ if (rws->get_value(rws, R300_VID_DRM_2_1_0)) {
desc->microtile = R300_BUFFER_SQUARETILED;
}
break;
R300_VID_PCI_ID,
R300_VID_GB_PIPES,
R300_VID_Z_PIPES,
- R300_VID_SQUARE_TILING_SUPPORT,
+ R300_VID_DRM_2_1_0, /* Square tiling. */
R300_VID_DRM_2_3_0, /* R500 VAP regs, MSPOS regs, fixed tex3D size checking */
R300_VID_DRM_2_6_0, /* Hyper-Z, GB_Z_PEQ_CONFIG on rv350->r4xx, R500 FG_ALPHA_VALUE */
R300_VID_DRM_2_8_0, /* R500 US_FORMAT regs, R500 ARGB2101010 colorbuffer */
enum r300_buffer_tiling macrotiled,
uint32_t pitch)
{
+#ifndef RADEON_BO_FLAGS_MICRO_TILE_SQUARE
+#define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20
+#endif
+
struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf));
uint32_t flags = 0;
+
if (microtiled == R300_BUFFER_TILED)
flags |= RADEON_BO_FLAGS_MICRO_TILE;
-/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */
-#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE
else if (microtiled == R300_BUFFER_SQUARETILED)
flags |= RADEON_BO_FLAGS_MICRO_TILE_SQUARE;
-#endif
+
if (macrotiled == R300_BUFFER_TILED)
flags |= RADEON_BO_FLAGS_MACRO_TILE;
exit(1);
}
-/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */
-#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE
- // Supported since 2.1.0.
- winsys->squaretiling = version->version_major > 2 ||
- version->version_minor >= 1;
-#endif
+ winsys->drm_2_1_0 = version->version_major > 2 ||
+ version->version_minor >= 1;
winsys->drm_2_3_0 = version->version_major > 2 ||
version->version_minor >= 3;
return ws->gb_pipes;
case R300_VID_Z_PIPES:
return ws->z_pipes;
- case R300_VID_SQUARE_TILING_SUPPORT:
- return ws->squaretiling;
+ case R300_VID_DRM_2_1_0:
+ return ws->drm_2_1_0;
case R300_VID_DRM_2_3_0:
return ws->drm_2_3_0;
case R300_VID_DRM_2_6_0:
uint32_t z_pipes; /* Z pipe count (rv530 only) */
uint32_t gart_size; /* GART size. */
uint32_t vram_size; /* VRAM size. */
- boolean squaretiling; /* Square tiling support. */
+ boolean drm_2_1_0; /* Square tiling support. */
/* DRM 2.3.0 (R500 VAP regs, MSPOS regs, fixed tex3D size checking) */
boolean drm_2_3_0;
/* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx, FG_ALPHA_VALUE) */