gallium: use new framebuffer width, height fields
This commit is contained in:
@@ -84,8 +84,6 @@ struct softpipe_context {
|
||||
unsigned num_samplers;
|
||||
unsigned num_textures;
|
||||
|
||||
uint fb_width, fb_height;
|
||||
|
||||
/* Counter for occlusion queries. Note this supports overlapping
|
||||
* queries.
|
||||
*/
|
||||
|
||||
@@ -485,7 +485,7 @@ setup_fragcoord_coeff(struct setup_stage *setup, uint slot)
|
||||
/*Y*/
|
||||
if (setup->softpipe->rasterizer->origin_lower_left) {
|
||||
/* y=0=bottom */
|
||||
const int winHeight = setup->softpipe->fb_height;
|
||||
const int winHeight = setup->softpipe->framebuffer.height;
|
||||
setup->coef[slot].a0[1] = (float) (winHeight - 1);
|
||||
setup->coef[slot].dady[1] = -1.0;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quad)
|
||||
int y0, y1;
|
||||
uint stipple0, stipple1;
|
||||
if (softpipe->rasterizer->origin_lower_left) {
|
||||
y0 = softpipe->fb_height - 1 - quad->y0;
|
||||
y0 = softpipe->framebuffer.height - 1 - quad->y0;
|
||||
y1 = y0 - 1;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -171,8 +171,8 @@ softpipe_get_vbuf_vertex_info(struct softpipe_context *softpipe)
|
||||
static void
|
||||
compute_cliprect(struct softpipe_context *sp)
|
||||
{
|
||||
uint surfWidth = sp->fb_width;
|
||||
uint surfHeight = sp->fb_height;
|
||||
uint surfWidth = sp->framebuffer.width;
|
||||
uint surfHeight = sp->framebuffer.height;
|
||||
|
||||
if (sp->rasterizer->scissor) {
|
||||
/* clip to scissor rect */
|
||||
|
||||
@@ -48,9 +48,6 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
|
||||
struct softpipe_context *sp = softpipe_context(pipe);
|
||||
uint i;
|
||||
|
||||
/* updated below */
|
||||
sp->fb_width = sp->fb_height = 0;
|
||||
|
||||
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
|
||||
/* check if changing cbuf */
|
||||
if (sp->framebuffer.cbufs[i] != fb->cbufs[i]) {
|
||||
@@ -63,10 +60,6 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
|
||||
/* update cache */
|
||||
sp_tile_cache_set_surface(sp->cbuf_cache[i], fb->cbufs[i]);
|
||||
}
|
||||
if (fb->cbufs[i]) {
|
||||
sp->fb_width = fb->cbufs[i]->width;
|
||||
sp->fb_height = fb->cbufs[i]->height;
|
||||
}
|
||||
}
|
||||
|
||||
sp->framebuffer.num_cbufs = fb->num_cbufs;
|
||||
@@ -81,11 +74,6 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
|
||||
|
||||
/* update cache */
|
||||
sp_tile_cache_set_surface(sp->zsbuf_cache, fb->zsbuf);
|
||||
|
||||
if (!sp->fb_width && fb->zsbuf) {
|
||||
sp->fb_width = fb->zsbuf->width;
|
||||
sp->fb_height = fb->zsbuf->height;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -113,9 +101,8 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe,
|
||||
}
|
||||
#endif
|
||||
|
||||
sp->framebuffer.width = fb->width;
|
||||
sp->framebuffer.height = fb->height;
|
||||
|
||||
sp->dirty |= SP_NEW_FRAMEBUFFER;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user