brw_blorp_mip_info::brw_blorp_mip_info()
: mt(NULL),
- level(0),
- layer(0),
width(0),
- height(0)
+ height(0),
+ x_offset(0),
+ y_offset(0)
{
}
intel_miptree_check_level_layer(mt, level, layer);
this->mt = mt;
- this->level = level;
- this->layer = layer;
this->width = mt->level[level].width;
this->height = mt->level[level].height;
+
+ /* Construct a dummy renderbuffer just to extract tile offsets. */
+ struct intel_renderbuffer rb;
+ rb.mt = mt;
+ rb.mt_level = level;
+ rb.mt_layer = layer;
+ intel_renderbuffer_set_draw_offset(&rb);
+ x_offset = rb.draw_x;
+ y_offset = rb.draw_y;
}
void
}
}
-void
-brw_blorp_mip_info::get_draw_offsets(uint32_t *draw_x, uint32_t *draw_y) const
-{
- /* Construct a dummy renderbuffer just to extract tile offsets. */
- struct intel_renderbuffer rb;
- rb.mt = mt;
- rb.mt_level = level;
- rb.mt_layer = layer;
- intel_renderbuffer_set_draw_offset(&rb);
- *draw_x = rb.draw_x;
- *draw_y = rb.draw_y;
-}
-
brw_blorp_params::brw_blorp_params()
: x0(0),
y0(0),
void set(struct intel_mipmap_tree *mt,
unsigned int level, unsigned int layer);
- void get_draw_offsets(uint32_t *draw_x, uint32_t *draw_y) const;
struct intel_mipmap_tree *mt;
- unsigned int level;
- unsigned int layer;
/**
* Width of the miplevel to be used. For surfaces using
* INTEL_MSAA_LAYOUT_IMS, this is measured in samples, not pixels.
*/
uint32_t height;
+
+ /**
+ * X offset within the surface to texture from (or render to). For
+ * surfaces using INTEL_MSAA_LAYOUT_IMS, this is measured in samples, not
+ * pixels.
+ */
+ uint32_t x_offset;
+
+ /**
+ * Y offset within the surface to texture from (or render to). For
+ * surfaces using INTEL_MSAA_LAYOUT_IMS, this is measured in samples, not
+ * pixels.
+ */
+ uint32_t y_offset;
};
class brw_blorp_surface_info : public brw_blorp_mip_info
const brw_blorp_params *params)
{
struct intel_context *intel = &brw->intel;
- uint32_t draw_x, draw_y;
+ uint32_t draw_x = params->depth.x_offset;
+ uint32_t draw_y = params->depth.y_offset;
uint32_t tile_mask_x, tile_mask_y;
gen6_blorp_compute_tile_masks(params, &tile_mask_x, &tile_mask_y);
- params->depth.get_draw_offsets(&draw_x, &draw_y);
/* 3DSTATE_DEPTH_BUFFER */
{
const brw_blorp_params *params)
{
struct intel_context *intel = &brw->intel;
- uint32_t draw_x, draw_y;
+ uint32_t draw_x = params->depth.x_offset;
+ uint32_t draw_y = params->depth.y_offset;
uint32_t tile_mask_x, tile_mask_y;
- if (params->depth.mt) {
- params->depth.get_draw_offsets(&draw_x, &draw_y);
- gen6_blorp_compute_tile_masks(params, &tile_mask_x, &tile_mask_y);
- }
+ gen6_blorp_compute_tile_masks(params, &tile_mask_x, &tile_mask_y);
/* 3DSTATE_DEPTH_BUFFER */
{