diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 05:30:39 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 05:30:39 +0000 |
commit | 27c93456b58343162f7c4ad20ca6bea0c9a91646 (patch) | |
tree | 945c20b63e0b9975ee40f114c5312f8d8f1a2d0b /lib/mesa/src/gallium/drivers/softpipe | |
parent | 875b83a3ee95e248388fbf72271acc80f6f97987 (diff) |
Import Mesa 20.1.6
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe')
11 files changed, 40 insertions, 117 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_buffer.c b/lib/mesa/src/gallium/drivers/softpipe/sp_buffer.c index 3ec738527..99925c380 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_buffer.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_buffer.c @@ -25,7 +25,7 @@ #include "sp_buffer.h" #include "sp_texture.h" -#include "util/u_format.h" +#include "util/format/u_format.h" static bool get_dimensions(const struct pipe_shader_buffer *bview, diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_clear.c b/lib/mesa/src/gallium/drivers/softpipe/sp_clear.c index d2626a243..300cbd077 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_clear.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_clear.c @@ -47,6 +47,7 @@ */ void softpipe_clear(struct pipe_context *pipe, unsigned buffers, + const struct pipe_scissor_state *scissor_state, const union pipe_color_union *color, double depth, unsigned stencil) { diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_clear.h b/lib/mesa/src/gallium/drivers/softpipe/sp_clear.h index 0398e5bad..b9a489a63 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_clear.h +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_clear.h @@ -36,6 +36,7 @@ struct pipe_context; extern void softpipe_clear(struct pipe_context *pipe, unsigned buffers, + const struct pipe_scissor_state *scissor_state, const union pipe_color_union *color, double depth, unsigned stencil); diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_image.c b/lib/mesa/src/gallium/drivers/softpipe/sp_image.c index 49b775cf0..08673d465 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_image.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_image.c @@ -25,7 +25,7 @@ #include "sp_image.h" #include "sp_texture.h" -#include "util/u_format.h" +#include "util/format/u_format.h" /* * Get the offset into the base image diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c index 5b458450c..975a76011 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -33,7 +33,7 @@ #include "pipe/p_defines.h" #include "util/u_math.h" #include "util/u_memory.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_dual_blend.h" #include "sp_context.h" #include "sp_state.h" diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c index 98dd36d21..e8433814c 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -31,7 +31,7 @@ */ #include "pipe/p_defines.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_math.h" #include "util/u_memory.h" #include "tgsi/tgsi_scan.h" diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_so.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_so.c index aa2f11880..b0cb55a26 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_so.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_so.c @@ -29,7 +29,7 @@ #include "sp_state.h" #include "sp_texture.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_memory.h" #include "draw/draw_context.h" #include "pipebuffer/pb_buffer.h" diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_surface.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_surface.c index dc4756146..4a8370901 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_surface.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_surface.c @@ -34,7 +34,7 @@ #include "draw/draw_context.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_inlines.h" diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_surface.c b/lib/mesa/src/gallium/drivers/softpipe/sp_surface.c index 390841137..e0a4841ed 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_surface.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_surface.c @@ -25,7 +25,7 @@ * **************************************************************************/ -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_surface.h" #include "sp_context.h" #include "sp_surface.h" diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c index e510ac58c..18b0331bc 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c @@ -35,7 +35,7 @@ #include "util/u_inlines.h" #include "util/u_memory.h" #include "util/u_tile.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_math.h" #include "sp_context.h" #include "sp_texture.h" @@ -205,7 +205,6 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc, union tex_tile_address addr ) { struct softpipe_tex_cached_tile *tile; - boolean zs = util_format_is_depth_or_stencil(tc->format); tile = tc->entries + tex_cache_pos( addr ); @@ -260,31 +259,13 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc, /* Get tile from the transfer (view into texture), explicitly passing * the image format. */ - if (!zs && util_format_is_pure_uint(tc->format)) { - pipe_get_tile_ui_format(tc->tex_trans, tc->tex_trans_map, - addr.bits.x * TEX_TILE_SIZE, - addr.bits.y * TEX_TILE_SIZE, - TEX_TILE_SIZE, - TEX_TILE_SIZE, - tc->format, - (unsigned *) tile->data.colorui); - } else if (!zs && util_format_is_pure_sint(tc->format)) { - pipe_get_tile_i_format(tc->tex_trans, tc->tex_trans_map, - addr.bits.x * TEX_TILE_SIZE, - addr.bits.y * TEX_TILE_SIZE, - TEX_TILE_SIZE, - TEX_TILE_SIZE, - tc->format, - (int *) tile->data.colori); - } else { - pipe_get_tile_rgba_format(tc->tex_trans, tc->tex_trans_map, - addr.bits.x * TEX_TILE_SIZE, - addr.bits.y * TEX_TILE_SIZE, - TEX_TILE_SIZE, - TEX_TILE_SIZE, - tc->format, - (float *) tile->data.color); - } + pipe_get_tile_rgba(tc->tex_trans, tc->tex_trans_map, + addr.bits.x * TEX_TILE_SIZE, + addr.bits.y * TEX_TILE_SIZE, + TEX_TILE_SIZE, + TEX_TILE_SIZE, + tc->format, + (float *) tile->data.color); tile->addr = addr; } 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 075d322f8..7617add03 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/lib/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -33,7 +33,7 @@ */ #include "util/u_inlines.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_memory.h" #include "util/u_tile.h" #include "sp_tile_cache.h" @@ -367,22 +367,10 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc, int layer) tc->tile->data.any, 0/*STRIDE*/); } else { - 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, - 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, - tc->surface->format, - (int *) tc->tile->data.colori128); - } else { - pipe_put_tile_rgba_format(pt, tc->transfer_map[layer], - x, y, TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tc->tile->data.color); - } + pipe_put_tile_rgba(pt, tc->transfer_map[layer], + x, y, TILE_SIZE, TILE_SIZE, + tc->surface->format, + tc->tile->data.color); } numCleared++; } @@ -408,28 +396,12 @@ sp_flush_tile(struct softpipe_tile_cache* tc, unsigned pos) tc->entries[pos]->data.depth32, 0/*STRIDE*/); } else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_put_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tc->entries[pos]->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_put_tile_i_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tc->entries[pos]->data.colori128); - } else { - pipe_put_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tc->entries[pos]->data.color); - } + pipe_put_tile_rgba(tc->transfer[layer], tc->transfer_map[layer], + tc->tile_addrs[pos].bits.x * TILE_SIZE, + tc->tile_addrs[pos].bits.y * TILE_SIZE, + TILE_SIZE, TILE_SIZE, + tc->surface->format, + tc->entries[pos]->data.color); } tc->tile_addrs[pos].bits.invalid = 1; /* mark as empty */ } @@ -538,28 +510,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc, tile->data.depth32, 0/*STRIDE*/); } else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_put_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tile->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_put_tile_i_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tile->data.colori128); - } else { - pipe_put_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tile->data.color); - } + pipe_put_tile_rgba(tc->transfer[layer], tc->transfer_map[layer], + tc->tile_addrs[pos].bits.x * TILE_SIZE, + tc->tile_addrs[pos].bits.y * TILE_SIZE, + TILE_SIZE, TILE_SIZE, + tc->surface->format, + tile->data.color); } } @@ -589,28 +545,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc, tile->data.depth32, 0/*STRIDE*/); } else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_get_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tile->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_get_tile_i_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tile->data.colori128); - } else { - pipe_get_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer], - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tile->data.color); - } + pipe_get_tile_rgba(tc->transfer[layer], tc->transfer_map[layer], + tc->tile_addrs[pos].bits.x * TILE_SIZE, + tc->tile_addrs[pos].bits.y * TILE_SIZE, + TILE_SIZE, TILE_SIZE, + tc->surface->format, + tile->data.color); } } } |