diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-23 05:01:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2019-05-23 05:01:20 +0000 |
commit | e2a3acb64af2657b1181806818eacad061103c23 (patch) | |
tree | 7535f61f2c3f8a69404befb400ecca145be4429c /lib/mesa/src/gallium/drivers/softpipe | |
parent | 1e3bb66f697283b6bd192f3a000d99d637624079 (diff) |
Import Mesa 19.0.5
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe')
-rw-r--r-- | lib/mesa/src/gallium/drivers/softpipe/sp_setup.c | 21 | ||||
-rw-r--r-- | lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c | 11 |
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_setup.c b/lib/mesa/src/gallium/drivers/softpipe/sp_setup.c index ffe49260b..a91e4f588 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_setup.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_setup.c @@ -390,17 +390,6 @@ setup_sort_vertices(struct setup_context *setup, return FALSE; } - - /* Prepare pixel offset for rasterisation: - * - pixel center (0.5, 0.5) for GL, or - * - assume (0.0, 0.0) for other APIs. - */ - if (setup->softpipe->rasterizer->half_pixel_center) { - setup->pixel_offset = 0.5f; - } else { - setup->pixel_offset = 0.0f; - } - return TRUE; } @@ -1476,6 +1465,16 @@ sp_setup_prepare(struct setup_context *setup) } } + /* Prepare pixel offset for rasterisation: + * - pixel center (0.5, 0.5) for GL, or + * - assume (0.0, 0.0) for other APIs. + */ + if (setup->softpipe->rasterizer->half_pixel_center) { + setup->pixel_offset = 0.5f; + } else { + setup->pixel_offset = 0.0f; + } + setup->max_layer = max_layer; sp->quad.first->begin( sp->quad.first ); diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c b/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c index 351736ee4..998939bdf 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -373,17 +373,18 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc, int layer) if (util_format_is_pure_uint(tc->surface->format)) { pipe_put_tile_ui_format(pt, tc->transfer_map[layer], x, y, TILE_SIZE, TILE_SIZE, - pt->resource->format, + tc->surface->format, (unsigned *) tc->tile->data.colorui128); } else if (util_format_is_pure_sint(tc->surface->format)) { pipe_put_tile_i_format(pt, tc->transfer_map[layer], x, y, TILE_SIZE, TILE_SIZE, - pt->resource->format, + tc->surface->format, (int *) tc->tile->data.colori128); } else { - pipe_put_tile_rgba(pt, tc->transfer_map[layer], - x, y, TILE_SIZE, TILE_SIZE, - (float *) tc->tile->data.color); + pipe_put_tile_rgba_format(pt, tc->transfer_map[layer], + x, y, TILE_SIZE, TILE_SIZE, + tc->surface->format, + (float *) tc->tile->data.color); } } numCleared++; |