{
if (buf_height(buf) > options.max_dimension)
- buf->stride = options.scratch_buf_size / options.max_dimension;
+ buf->stride = buf->size / options.max_dimension;
if (buf_height(buf) < options.tile_size)
- buf->stride = options.scratch_buf_size / options.tile_size;
+ buf->stride = buf->size / options.tile_size;
if (buf_width(buf) < options.tile_size)
buf->stride = options.tile_size * sizeof(uint32_t);
static void init_buffer(struct scratch_buf *buf, unsigned size)
{
buf->bo = drm_intel_bo_alloc(bufmgr, "tiled bo", size, 4096);
+ buf->size = size;
assert(buf->bo);
buf->tiling = I915_TILING_NONE;
buf->stride = 4096;
uint32_t tiling;
uint32_t *data;
uint32_t *cpu_mapping;
+ uint32_t size;
unsigned num_tiles;
};
static inline unsigned buf_height(struct scratch_buf *buf)
{
- return options.scratch_buf_size/buf->stride;
+ return buf->size/buf->stride;
}
void gen6_render_copyfunc(struct scratch_buf *src, unsigned src_x, unsigned src_y,