* alignment size returned by intel_get_non_msrt_mcs_alignment(), but
* with X alignment multiplied by 16 and Y alignment multiplied by 32.
*/
- intel_get_non_msrt_mcs_alignment(mt, &x_align, &y_align);
+ intel_get_non_msrt_mcs_alignment(brw, mt, &x_align, &y_align);
x_align *= 16;
/* SKL+ line alignment requirement for Y-tiled are half those of the prior
* by a factor of 2.
*/
- intel_get_non_msrt_mcs_alignment(mt, &x_align, &y_align);
+ intel_get_non_msrt_mcs_alignment(brw, mt, &x_align, &y_align);
if (brw->gen >= 9) {
x_scaledown = x_align * 8;
y_scaledown = y_align * 8;
* by half the block width, and Y coordinates by half the block height.
*/
void
-intel_get_non_msrt_mcs_alignment(const struct intel_mipmap_tree *mt,
+intel_get_non_msrt_mcs_alignment(const struct brw_context *brw,
+ const struct intel_mipmap_tree *mt,
unsigned *width_px, unsigned *height)
{
switch (mt->tiling) {
*height = 4;
break;
case I915_TILING_X:
+ /* The docs are somewhat confusing with the way the tables are displayed.
+ * However, it does clearly state: "MCS and Lossless compression is
+ * supported for TiledY/TileYs/TileYf non-MSRTs only."
+ */
+ assert(brw->gen < 9);
*width_px = 64 / mt->cpp;
*height = 2;
}
const mesa_format format = MESA_FORMAT_R_UINT32;
unsigned block_width_px;
unsigned block_height;
- intel_get_non_msrt_mcs_alignment(mt, &block_width_px, &block_height);
+ intel_get_non_msrt_mcs_alignment(brw, mt, &block_width_px, &block_height);
unsigned width_divisor = block_width_px * 4;
unsigned height_divisor = block_height * 8;
};
void
-intel_get_non_msrt_mcs_alignment(const struct intel_mipmap_tree *mt,
+intel_get_non_msrt_mcs_alignment(const struct brw_context *brw,
+ const struct intel_mipmap_tree *mt,
unsigned *width_px, unsigned *height);
bool
int cpp;
unsigned long pitch;
- tiling = I915_TILING_X;
+ if (intelScreen->devinfo->gen >= 9) {
+ tiling = I915_TILING_Y;
+ } else {
+ tiling = I915_TILING_X;
+ }
if (use & __DRI_IMAGE_USE_CURSOR) {
if (width != 64 || height != 64)
return NULL;
drm_intel_bo *buffer;
unsigned long flags = 0;
unsigned long aligned_pitch;
- uint32_t tiling = I915_TILING_X;
uint32_t swizzle_mode = 0;
+ uint32_t tiling;
+
+ if (screen->devinfo->gen >= 9) {
+ tiling = I915_TILING_Y;
+ } else {
+ tiling = I915_TILING_X;
+ }
buffer = drm_intel_bo_alloc_tiled(screen->bufmgr, "swizzle test",
64, 64, 4,
return NULL;
/* The front and back buffers are color buffers, which are X tiled. */
- uint32_t tiling = I915_TILING_X;
+ uint32_t tiling;
+ if (intelScreen->devinfo->gen >= 9) {
+ tiling = I915_TILING_Y;
+ } else {
+ tiling = I915_TILING_X;
+ }
unsigned long pitch;
int cpp = format / 8;
intelBuffer->bo = drm_intel_bo_alloc_tiled(intelScreen->bufmgr,