irb->map_h = h;
/* Flip the Y axis for the default framebuffer. */
+ int region_h = irb->region->height;
int y_flip = (rb->Name == 0) ? -1 : 1;
- int y_bias = (rb->Name == 0) ? (2 * irb->region->height - 1) : 0;
+ int y_bias = (rb->Name == 0) ? (region_h * 2 + region_h % 2 - 1) : 0;
irb->map_buffer = malloc(w * h);
untiled_s8_map = irb->map_buffer;
uint8_t *tiled_s8_map = irb->region->bo->virtual;
/* Flip the Y axis for the default framebuffer. */
+ int region_h = irb->region->height;
int y_flip = (rb->Name == 0) ? -1 : 1;
- int y_bias = (rb->Name == 0) ? (2 * irb->region->height - 1) : 0;
+ int y_bias = (rb->Name == 0) ? (region_h * 2 + region_h % 2 - 1) : 0;
for (uint32_t pix_y = 0; pix_y < irb->map_h; pix_y++) {
for (uint32_t pix_x = 0; pix_x < irb->map_w; pix_x++) {
struct intel_renderbuffer *irb = intel_renderbuffer(rb); \
uint8_t *buf = irb->region->bo->virtual; \
unsigned stride = irb->region->pitch; \
- unsigned height = 2 * irb->region->height; \
+ unsigned height = irb->region->height; \
bool flip = rb->Name == 0; \
int y_scale = flip ? -1 : 1; \
- int y_bias = flip ? (height - 1) : 0; \
+ int y_bias = flip ? (height * 2 + height % 2 - 1) : 0; \
#undef Y_FLIP
#define Y_FLIP(y) (y_scale * (y) + y_bias)