mesa/src/gallium/drivers/llvmpipe/lp_rast.c

907 lines
24 KiB
C
Raw Normal View History

/**************************************************************************
*
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
#include <limits.h>
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_rect.h"
#include "util/u_surface.h"
#include "util/u_pack_color.h"
#include "lp_scene_queue.h"
#include "lp_debug.h"
#include "lp_fence.h"
#include "lp_perf.h"
#include "lp_query.h"
#include "lp_rast.h"
2009-10-08 17:26:13 +01:00
#include "lp_rast_priv.h"
#include "lp_tile_soa.h"
#include "gallivm/lp_bld_debug.h"
#include "lp_scene.h"
#ifdef DEBUG
int jit_line = 0;
const struct lp_rast_state *jit_state = NULL;
#endif
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/**
* Begin rasterizing a scene.
* Called once per scene by one thread.
2009-11-30 21:02:01 +00:00
*/
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
static void
lp_rast_begin( struct lp_rasterizer *rast,
struct lp_scene *scene )
{
2009-10-09 14:29:25 +01:00
rast->curr_scene = scene;
2009-10-09 14:02:39 +01:00
LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
2009-10-09 14:29:25 +01:00
lp_scene_begin_rasterization( scene );
lp_scene_bin_iter_begin( scene );
}
2009-10-09 14:29:25 +01:00
static void
lp_rast_end( struct lp_rasterizer *rast )
{
lp_scene_end_rasterization( rast->curr_scene );
2009-10-09 14:29:25 +01:00
rast->curr_scene = NULL;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
#ifdef DEBUG
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
if (0)
debug_printf("Post render scene: tile unswizzle: %u tile swizzle: %u\n",
lp_tile_unswizzle_count, lp_tile_swizzle_count);
#endif
}
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
2009-11-30 21:02:01 +00:00
/**
* Begining rasterization of a tile.
* \param x window X position of the tile, in pixels
* \param y window Y position of the tile, in pixels
*/
static void
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
lp_rast_tile_begin(struct lp_rasterizer_task *task,
const struct cmd_bin *bin)
{
const struct lp_scene *scene = task->scene;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
enum lp_texture_usage usage;
LP_DBG(DEBUG_RAST, "%s %d,%d\n", __FUNCTION__, bin->x, bin->y);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
task->bin = bin;
task->x = bin->x * TILE_SIZE;
task->y = bin->y * TILE_SIZE;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* reset pointers to color tile(s) */
memset(task->color_tiles, 0, sizeof(task->color_tiles));
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* get pointer to depth/stencil tile */
{
struct pipe_surface *zsbuf = task->scene->fb.zsbuf;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
if (zsbuf) {
struct llvmpipe_resource *lpt = llvmpipe_resource(zsbuf->texture);
if (scene->has_depthstencil_clear)
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
usage = LP_TEX_USAGE_WRITE_ALL;
else
usage = LP_TEX_USAGE_READ_WRITE;
/* "prime" the tile: convert data from linear to tiled if necessary
* and update the tile's layout info.
*/
(void) llvmpipe_get_texture_tile(lpt,
zsbuf->face + zsbuf->zslice,
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
zsbuf->level,
usage,
task->x,
task->y);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* Get actual pointer to the tile data. Note that depth/stencil
* data is tiled differently than color data.
*/
task->depth_tile = lp_rast_get_depth_block_pointer(task,
task->x,
task->y);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
assert(task->depth_tile);
}
else {
task->depth_tile = NULL;
}
}
}
2009-11-30 21:02:01 +00:00
/**
* Clear the rasterizer's current color tile.
* This is a bin command called during bin processing.
2009-11-30 21:02:01 +00:00
*/
static void
lp_rast_clear_color(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
const struct lp_scene *scene = task->scene;
const uint8_t *clear_color = arg.clear_color;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
unsigned i;
LP_DBG(DEBUG_RAST, "%s 0x%x,0x%x,0x%x,0x%x\n", __FUNCTION__,
2009-10-09 14:07:25 +01:00
clear_color[0],
clear_color[1],
clear_color[2],
clear_color[3]);
2009-10-09 14:02:39 +01:00
if (clear_color[0] == clear_color[1] &&
clear_color[1] == clear_color[2] &&
clear_color[2] == clear_color[3]) {
/* clear to grayscale value {x, x, x, x} */
for (i = 0; i < scene->fb.nr_cbufs; i++) {
uint8_t *ptr =
lp_rast_get_color_tile_pointer(task, i, LP_TEX_USAGE_WRITE_ALL);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
memset(ptr, clear_color[0], TILE_SIZE * TILE_SIZE * 4);
}
}
else {
/* Non-gray color.
* Note: if the swizzled tile layout changes (see TILE_PIXEL) this code
* will need to change. It'll be pretty obvious when clearing no longer
* works.
*/
const unsigned chunk = TILE_SIZE / 4;
for (i = 0; i < scene->fb.nr_cbufs; i++) {
uint8_t *c =
lp_rast_get_color_tile_pointer(task, i, LP_TEX_USAGE_WRITE_ALL);
unsigned j;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
for (j = 0; j < 4 * TILE_SIZE; j++) {
memset(c, clear_color[0], chunk);
c += chunk;
memset(c, clear_color[1], chunk);
c += chunk;
memset(c, clear_color[2], chunk);
c += chunk;
memset(c, clear_color[3], chunk);
c += chunk;
}
}
}
LP_COUNT(nr_color_tile_clear);
}
2009-11-30 21:02:01 +00:00
2009-11-30 21:02:01 +00:00
/**
* Clear the rasterizer's current z/stencil tile.
* This is a bin command called during bin processing.
2009-11-30 21:02:01 +00:00
*/
static void
lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
const struct lp_scene *scene = task->scene;
unsigned clear_value = arg.clear_zstencil.value;
unsigned clear_mask = arg.clear_zstencil.mask;
const unsigned height = TILE_SIZE / TILE_VECTOR_HEIGHT;
const unsigned width = TILE_SIZE * TILE_VECTOR_HEIGHT;
const unsigned block_size = scene->zsbuf.blocksize;
const unsigned dst_stride = scene->zsbuf.stride * TILE_VECTOR_HEIGHT;
uint8_t *dst;
unsigned i, j;
LP_DBG(DEBUG_RAST, "%s 0x%x%x\n", __FUNCTION__, clear_value, clear_mask);
2009-10-09 14:02:39 +01:00
/*
* Clear the aera of the swizzled depth/depth buffer matching this tile, in
* stripes of TILE_VECTOR_HEIGHT x TILE_SIZE at a time.
*
* The swizzled depth format is such that the depths for
* TILE_VECTOR_HEIGHT x TILE_VECTOR_WIDTH pixels have consecutive offsets.
*/
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
dst = task->depth_tile;
switch (block_size) {
case 1:
memset(dst, (uint8_t) clear_value, height * width);
break;
case 2:
for (i = 0; i < height; i++) {
uint16_t *row = (uint16_t *)dst;
for (j = 0; j < width; j++)
*row++ = (uint16_t) clear_value;
dst += dst_stride;
}
break;
case 4:
if (clear_mask == 0xffffffff) {
for (i = 0; i < height; i++) {
uint32_t *row = (uint32_t *)dst;
for (j = 0; j < width; j++)
*row++ = clear_value;
dst += dst_stride;
}
}
else {
for (i = 0; i < height; i++) {
uint32_t *row = (uint32_t *)dst;
for (j = 0; j < width; j++) {
uint32_t tmp = ~clear_mask & *row;
*row++ = (clear_value & clear_mask) | tmp;
}
dst += dst_stride;
}
}
break;
default:
assert(0);
break;
}
}
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/**
* Convert the color tile from tiled to linear layout.
* This is generally only done when we're flushing the scene just prior to
* SwapBuffers. If we didn't do this here, we'd have to convert the entire
* tiled color buffer to linear layout in the llvmpipe_texture_unmap()
* function. It's better to do it here to take advantage of
* threading/parallelism.
* This is a bin command which is stored in all bins.
*/
static void
2010-09-07 12:45:23 +01:00
lp_rast_store_linear_color( struct lp_rasterizer_task *task )
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
{
const struct lp_scene *scene = task->scene;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
unsigned buf;
for (buf = 0; buf < scene->fb.nr_cbufs; buf++) {
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
struct pipe_surface *cbuf = scene->fb.cbufs[buf];
const unsigned face_slice = cbuf->face + cbuf->zslice;
const unsigned level = cbuf->level;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
struct llvmpipe_resource *lpt = llvmpipe_resource(cbuf->texture);
if (!task->color_tiles[buf])
continue;
llvmpipe_unswizzle_cbuf_tile(lpt,
face_slice,
level,
task->x, task->y,
task->color_tiles[buf]);
}
}
/**
* Run the shader on all blocks in a tile. This is used when a tile is
* completely contained inside a triangle.
* This is a bin command called during bin processing.
*/
static void
lp_rast_shade_tile(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
const struct lp_scene *scene = task->scene;
const struct lp_rast_shader_inputs *inputs = arg.shade_tile;
const struct lp_rast_state *state = inputs->state;
struct lp_fragment_shader_variant *variant = state->variant;
const unsigned tile_x = task->x, tile_y = task->y;
unsigned x, y;
if (inputs->disable) {
/* This command was partially binned and has been disabled */
return;
}
LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
2009-10-09 14:02:39 +01:00
/* render the whole 64x64 tile in 4x4 chunks */
for (y = 0; y < TILE_SIZE; y += 4){
for (x = 0; x < TILE_SIZE; x += 4) {
uint8_t *color[PIPE_MAX_COLOR_BUFS];
uint32_t *depth;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
unsigned i;
/* color buffer */
for (i = 0; i < scene->fb.nr_cbufs; i++)
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
color[i] = lp_rast_get_color_block_pointer(task, i,
tile_x + x, tile_y + y);
/* depth buffer */
depth = lp_rast_get_depth_block_pointer(task, tile_x + x, tile_y + y);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* run shader on 4x4 block */
BEGIN_JIT_CALL(state);
variant->jit_function[RAST_WHOLE]( &state->jit_context,
tile_x + x, tile_y + y,
inputs->facing,
inputs->a0,
inputs->dadx,
inputs->dady,
color,
depth,
0xffff,
&task->vis_counter);
END_JIT_CALL();
}
}
}
/**
* Run the shader on all blocks in a tile. This is used when a tile is
* completely contained inside a triangle, and the shader is opaque.
* This is a bin command called during bin processing.
*/
static void
lp_rast_shade_tile_opaque(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
const struct lp_scene *scene = task->scene;
unsigned i;
LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__);
/* this will prevent converting the layout from tiled to linear */
for (i = 0; i < scene->fb.nr_cbufs; i++) {
(void)lp_rast_get_color_tile_pointer(task, i, LP_TEX_USAGE_WRITE_ALL);
}
lp_rast_shade_tile(task, arg);
}
/**
* Compute shading for a 4x4 block of pixels inside a triangle.
* This is a bin command called during bin processing.
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
* \param x X position of quad in window coords
* \param y Y position of quad in window coords
*/
void
lp_rast_shade_quads_mask(struct lp_rasterizer_task *task,
const struct lp_rast_shader_inputs *inputs,
unsigned x, unsigned y,
unsigned mask)
{
const struct lp_rast_state *state = inputs->state;
struct lp_fragment_shader_variant *variant = state->variant;
const struct lp_scene *scene = task->scene;
uint8_t *color[PIPE_MAX_COLOR_BUFS];
void *depth;
unsigned i;
assert(state);
/* Sanity checks */
assert(x % TILE_VECTOR_WIDTH == 0);
assert(y % TILE_VECTOR_HEIGHT == 0);
2009-12-15 22:39:48 +00:00
assert((x % 4) == 0);
assert((y % 4) == 0);
/* color buffer */
for (i = 0; i < scene->fb.nr_cbufs; i++) {
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
color[i] = lp_rast_get_color_block_pointer(task, i, x, y);
assert(lp_check_alignment(color[i], 16));
}
/* depth buffer */
depth = lp_rast_get_depth_block_pointer(task, x, y);
assert(lp_check_alignment(state->jit_context.blend_color, 16));
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* run shader on 4x4 block */
BEGIN_JIT_CALL(state);
variant->jit_function[RAST_EDGE_TEST](&state->jit_context,
x, y,
inputs->facing,
inputs->a0,
inputs->dadx,
inputs->dady,
color,
depth,
mask,
&task->vis_counter);
END_JIT_CALL();
}
2010-09-07 12:45:23 +01:00
/**
* Begin a new occlusion query.
* This is a bin command put in all bins.
* Called per thread.
*/
static void
2010-09-07 12:45:23 +01:00
lp_rast_begin_query(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
struct llvmpipe_query *pq = arg.query_obj;
assert(task->query == NULL);
task->vis_counter = 0;
task->query = pq;
}
/**
* End the current occlusion query.
* This is a bin command put in all bins.
* Called per thread.
*/
static void
2010-09-07 12:45:23 +01:00
lp_rast_end_query(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg)
{
task->query->count[task->thread_index] += task->vis_counter;
task->query = NULL;
}
/**
* Set top row and left column of the tile's pixels to white. For debugging.
*/
static void
outline_tile(uint8_t *tile)
{
const uint8_t val = 0xff;
unsigned i;
for (i = 0; i < TILE_SIZE; i++) {
TILE_PIXEL(tile, i, 0, 0) = val;
TILE_PIXEL(tile, i, 0, 1) = val;
TILE_PIXEL(tile, i, 0, 2) = val;
TILE_PIXEL(tile, i, 0, 3) = val;
TILE_PIXEL(tile, 0, i, 0) = val;
TILE_PIXEL(tile, 0, i, 1) = val;
TILE_PIXEL(tile, 0, i, 2) = val;
TILE_PIXEL(tile, 0, i, 3) = val;
}
}
/**
* Draw grid of gray lines at 16-pixel intervals across the tile to
* show the sub-tile boundaries. For debugging.
*/
static void
outline_subtiles(uint8_t *tile)
{
const uint8_t val = 0x80;
const unsigned step = 16;
unsigned i, j;
for (i = 0; i < TILE_SIZE; i += step) {
for (j = 0; j < TILE_SIZE; j++) {
TILE_PIXEL(tile, i, j, 0) = val;
TILE_PIXEL(tile, i, j, 1) = val;
TILE_PIXEL(tile, i, j, 2) = val;
TILE_PIXEL(tile, i, j, 3) = val;
TILE_PIXEL(tile, j, i, 0) = val;
TILE_PIXEL(tile, j, i, 1) = val;
TILE_PIXEL(tile, j, i, 2) = val;
TILE_PIXEL(tile, j, i, 3) = val;
}
}
outline_tile(tile);
}
2009-11-30 21:02:01 +00:00
/**
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
* Called when we're done writing to a color tile.
2009-11-30 21:02:01 +00:00
*/
static void
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
lp_rast_tile_end(struct lp_rasterizer_task *task)
{
#ifdef DEBUG
if (LP_DEBUG & (DEBUG_SHOW_SUBTILES | DEBUG_SHOW_TILES)) {
const struct lp_scene *scene = task->scene;
unsigned buf;
for (buf = 0; buf < scene->fb.nr_cbufs; buf++) {
uint8_t *color = lp_rast_get_color_block_pointer(task, buf,
task->x, task->y);
if (LP_DEBUG & DEBUG_SHOW_SUBTILES)
outline_subtiles(color);
else if (LP_DEBUG & DEBUG_SHOW_TILES)
outline_tile(color);
}
}
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
#else
(void) outline_subtiles;
#endif
2010-09-07 12:45:23 +01:00
lp_rast_store_linear_color(task);
2010-08-27 17:14:49 +01:00
if (task->query) {
union lp_rast_cmd_arg dummy = {0};
lp_rast_end_query(task, dummy);
}
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
/* debug */
memset(task->color_tiles, 0, sizeof(task->color_tiles));
task->depth_tile = NULL;
task->bin = NULL;
}
static lp_rast_cmd_func dispatch[LP_RAST_OP_MAX] =
{
lp_rast_clear_color,
lp_rast_clear_zstencil,
lp_rast_triangle_1,
lp_rast_triangle_2,
lp_rast_triangle_3,
lp_rast_triangle_4,
lp_rast_triangle_5,
lp_rast_triangle_6,
lp_rast_triangle_7,
lp_rast_triangle_8,
lp_rast_triangle_3_16,
lp_rast_shade_tile,
lp_rast_shade_tile_opaque,
lp_rast_begin_query,
lp_rast_end_query,
};
static void
do_rasterize_bin(struct lp_rasterizer_task *task,
const struct cmd_bin *bin)
{
const struct cmd_block *block;
unsigned k;
if (0)
lp_debug_bin(bin);
for (block = bin->head; block; block = block->next) {
for (k = 0; k < block->count; k++) {
dispatch[block->cmd[k]]( task, block->arg[k] );
}
}
}
/**
* Rasterize commands for a single bin.
* \param x, y position of the bin's tile in the framebuffer
* Must be called between lp_rast_begin() and lp_rast_end().
* Called per thread.
*/
static void
rasterize_bin(struct lp_rasterizer_task *task,
const struct cmd_bin *bin )
{
lp_rast_tile_begin( task, bin );
do_rasterize_bin(task, bin);
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
lp_rast_tile_end(task);
/* Debug/Perf flags:
*/
if (bin->head->count == 1) {
if (bin->head->cmd[0] == LP_RAST_OP_SHADE_TILE_OPAQUE)
LP_COUNT(nr_pure_shade_opaque_64);
else if (bin->head->cmd[0] == LP_RAST_OP_SHADE_TILE)
LP_COUNT(nr_pure_shade_64);
}
}
/* An empty bin is one that just loads the contents of the tile and
* stores them again unchanged. This typically happens when bins have
* been flushed for some reason in the middle of a frame, or when
* incremental updates are being made to a render target.
*
* Try to avoid doing pointless work in this case.
*/
static boolean
is_empty_bin( const struct cmd_bin *bin )
{
return bin->head == NULL;
}
/**
* Rasterize/execute all bins within a scene.
* Called per thread.
*/
static void
rasterize_scene(struct lp_rasterizer_task *task,
struct lp_scene *scene)
{
task->scene = scene;
/* loop over scene bins, rasterize each */
#if 0
{
unsigned i, j;
for (i = 0; i < scene->tiles_x; i++) {
for (j = 0; j < scene->tiles_y; j++) {
struct cmd_bin *bin = lp_scene_get_bin(scene, i, j);
rasterize_bin(task, bin, i, j);
}
}
}
#else
{
struct cmd_bin *bin;
assert(scene);
while ((bin = lp_scene_bin_iter_next(scene))) {
if (!is_empty_bin( bin ))
rasterize_bin(task, bin);
}
}
#endif
if (scene->fence) {
2010-09-07 12:45:23 +01:00
lp_fence_signal(scene->fence);
}
task->scene = NULL;
}
/**
2009-12-11 18:16:48 +00:00
* Called by setup module when it has something for us to render.
*/
void
lp_rast_queue_scene( struct lp_rasterizer *rast,
struct lp_scene *scene)
{
LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
if (rast->num_threads == 0) {
/* no threading */
lp_rast_begin( rast, scene );
rasterize_scene( &rast->tasks[0], scene );
2009-12-09 23:02:30 +00:00
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
lp_rast_end( rast );
rast->curr_scene = NULL;
}
else {
/* threaded rendering! */
unsigned i;
lp_scene_enqueue( rast->full_scenes, scene );
/* signal the threads that there's work to do */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_signal(&rast->tasks[i].work_ready);
}
}
LP_DBG(DEBUG_SETUP, "%s done \n", __FUNCTION__);
}
void
lp_rast_finish( struct lp_rasterizer *rast )
{
if (rast->num_threads == 0) {
/* nothing to do */
}
else {
int i;
/* wait for work to complete */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_wait(&rast->tasks[i].work_done);
}
}
}
/**
* This is the thread's main entrypoint.
* It's a simple loop:
* 1. wait for work
* 2. do work
* 3. signal that we're done
*/
static PIPE_THREAD_ROUTINE( thread_func, init_data )
{
struct lp_rasterizer_task *task = (struct lp_rasterizer_task *) init_data;
struct lp_rasterizer *rast = task->rast;
boolean debug = false;
while (1) {
/* wait for work */
if (debug)
debug_printf("thread %d waiting for work\n", task->thread_index);
pipe_semaphore_wait(&task->work_ready);
if (rast->exit_flag)
break;
if (task->thread_index == 0) {
/* thread[0]:
* - get next scene to rasterize
* - map the framebuffer surfaces
*/
lp_rast_begin( rast,
lp_scene_dequeue( rast->full_scenes, TRUE ) );
}
/* Wait for all threads to get here so that threads[1+] don't
* get a null rast->curr_scene pointer.
*/
pipe_barrier_wait( &rast->barrier );
/* do work */
if (debug)
debug_printf("thread %d doing work\n", task->thread_index);
rasterize_scene(task,
rast->curr_scene);
/* wait for all threads to finish with this scene */
pipe_barrier_wait( &rast->barrier );
/* XXX: shouldn't be necessary:
*/
if (task->thread_index == 0) {
lp_rast_end( rast );
}
/* signal done with work */
if (debug)
debug_printf("thread %d done working\n", task->thread_index);
pipe_semaphore_signal(&task->work_done);
}
return NULL;
}
/**
* Initialize semaphores and spawn the threads.
*/
static void
create_rast_threads(struct lp_rasterizer *rast)
{
unsigned i;
/* NOTE: if num_threads is zero, we won't use any threads */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_init(&rast->tasks[i].work_ready, 0);
pipe_semaphore_init(&rast->tasks[i].work_done, 0);
rast->threads[i] = pipe_thread_create(thread_func,
(void *) &rast->tasks[i]);
}
}
/**
2010-04-27 17:55:51 +01:00
* Create new lp_rasterizer. If num_threads is zero, don't create any
* new threads, do rendering synchronously.
* \param num_threads number of rasterizer threads to create
*/
struct lp_rasterizer *
lp_rast_create( unsigned num_threads )
{
struct lp_rasterizer *rast;
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
unsigned i;
rast = CALLOC_STRUCT(lp_rasterizer);
if(!rast)
return NULL;
rast->full_scenes = lp_scene_queue_create();
for (i = 0; i < Elements(rast->tasks); i++) {
2010-01-19 23:58:25 +00:00
struct lp_rasterizer_task *task = &rast->tasks[i];
task->rast = rast;
task->thread_index = i;
}
rast->num_threads = num_threads;
create_rast_threads(rast);
/* for synchronizing rasterization threads */
pipe_barrier_init( &rast->barrier, rast->num_threads );
memset(lp_swizzled_cbuf, 0, sizeof lp_swizzled_cbuf);
memset(lp_dummy_tile, 0, sizeof lp_dummy_tile);
return rast;
}
/* Shutdown:
*/
void lp_rast_destroy( struct lp_rasterizer *rast )
{
Merge the lp-surface-tiling branch into master. This branch implemented dual representations of texture/drawing surfaces: one in the conventional linear layout and the other the tiled layout which is used by the fragment shader pipe. Per-tile flags indicate the layout of each image tile. In many situations this lets us avoid converting image data between the two layouts. Squashed commit of the following: commit 563a7e3cc552fdcfcaf9ac0d4b1683c3ba2ae732 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:48:21 2010 -0600 llvmpipe: convert points/lines to triangles with draw module This isn't the most efficient way to render points/lines but it allows us to run more tests. commit a8aa763e8a717533f2b13bb6ea53cbccbede68c9 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 14:47:28 2010 -0600 llvmpipe: call llvmpipe_get_texture_tile() for depth/stencil The returned pointer isn't used, but the tile status/layout info gets updated. Helps to fix glReadPixels(DEPTH / STENCIL). commit 463bc64af266194acbea71cd52e26a79b8c8a260 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:58:48 2010 -0600 llvmpipe: add store_color to debug cmd_names list commit 784cc73fb334a9d7b7c93cbd8a1445cdf742ff58 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:57:43 2010 -0600 llvmpipe: fix debug build commit 792c93171ec075664f55720ffed397ac2834a4fc Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 10:49:01 2010 -0600 llvmpipe: fix cube mapping commit 882b1035db88c3dd8aebe28dc971ac30a9ee39e3 Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:53:30 2010 -0600 llvmpipe: remove some older/unused code commit b807d32b23145301e8842824664d9f06b9c5502e Author: Brian Paul <brianp@vmware.com> Date: Thu Apr 8 09:29:50 2010 -0600 llvmpipe: silence warning commit 7b337e64fec92836ccdf9d96216289dd58418e35 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 17:06:08 2010 -0600 llvmpipe: clean-up, comments in lp_surface_copy() commit c52fa36f249cc652fa8d5fdd94d6574127c08c41 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:42 2010 -0600 llvmpipe: overhaul tiled/linear memory management Now we keep per-tile layout info (linear vs. tiled (or neither or both) and convert from one layout to the other on demand. commit 4a50ccfd470547c9be0704005818a87014e9c0e9 Author: Brian Paul <brianp@vmware.com> Date: Wed Apr 7 16:51:27 2010 -0600 llvmpipe: added tile read/write counters commit b7d0ea9c687ac8773b083791623826fa604adf21 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:54:04 2010 -0600 llvmpipe: rename some functions commit ee45c6e5b95cbd3c8cccc9aa4d45d8aef11e20c4 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:42:15 2010 -0600 llvmpipe: re-org some get block/tile pointer code commit 26ce97c16c0b6520ff1538803baa772d8c3b1280 Author: Brian Paul <brianp@vmware.com> Date: Mon Apr 5 14:34:13 2010 -0600 llvmpipe: disable bad assertions commit 5c670481248c4d46f87f13bf3af5655925e7002d Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:36:11 2010 -0600 llvmpipe: add a special-case optimization to lp_surface_copy() Be more efficient when copying tiled image to linear image. Before, the fallback path was always converting the whole source image to linear. Now we can convert just a sub region. commit faa684645e64d6024b3a11e4e08da825e8220b2e Author: Brian Paul <brianp@vmware.com> Date: Fri Apr 2 16:15:16 2010 -0600 llvmpipe: assorted texture and tile/line conversion code change s The tiled/linear conversion functions take x/y positions now to allow converting only sub-regions. More texture-related helper functions. commit baad81ec5318d44bfac1e37c7643afc0836607bb Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 13:18:40 2010 -0600 llvmpipe: convert tiled->linear upon PIPE_FLUSH_SWAPBUFFERS If we know we're about to do a swapbuffers we should immediately convert the tiled color tiles to linear instead of later in llvmpipe_texture_unmap() since we can take advantage of threading/ parallelism here. commit 928dd41256811daeddb7506a49a34dbad04beaf8 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:16:58 2010 -0600 llvmpipe: polish-up the llvmpipe_flush() code commit dd6014abcf86c517d159b8175e0eaeb167ea2ef6 Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 30 09:15:17 2010 -0600 llvmpipe: SETUP_x enum clean-up commit 0b1ce6da2b28a41f3389685ab93e10b43c950f5d Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:43:37 2010 -0600 llvmpipe: remove unused vars commit 4562663480f88162ed4452cb05569eecb67f9f39 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 26 10:31:55 2010 -0600 llvmpipe: cope with non-existant color/depth buffers The fragment jit functions always grab these pointers, even if they're not used. commit df4329edbaf204ed501f1eac0698b8198178f9af Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 15:20:15 2010 -0600 llvmpipe: do all render target surface mapping/unmapping in the rast code commit 3d0c25d5ba8b8f61e8366d4c97324e45d526ff41 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 14:31:21 2010 -0600 llvmpipe: map z/stencil buffer on demand like color buffers Plus lots of code clean-up and loose ends taken care of. commit c3b6fddd788aef09b4b84b843b7b1272231151e8 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 13:15:03 2010 -0600 llvmpipe: remove unused write_zstencil field commit 63374d97836926a6357e9d6dd24a509a8e155c56 Author: Brian Paul <brianp@vmware.com> Date: Thu Mar 25 09:45:59 2010 -0600 llvmpipe: add missing lp_rast_end() call Fixes crash on window resize when LP_NUM_THREADS=0. commit 92fe9952161cc06f6edc58778e9e5a8b9ea447dc Author: Brian Paul <brianp@vmware.com> Date: Wed Mar 24 10:15:19 2010 -0600 llvmpipe: add tiled/linear conversion for 16-bit Z images commit 6605fa28c147f30df351da0e4413cab33e4db5da Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:06:41 2010 -0600 llvmpipe: implement tiled/linear conversion for Z/stencil images commit 804528d84ffa292ef9d49d3666cdd3fa099ff3ff Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:05:45 2010 -0600 llvmpipe: added texture stride comment commit 66a88c012edf670c4ac887a912f02dcff93266dd Author: Brian Paul <brianp@vmware.com> Date: Tue Mar 23 16:04:07 2010 -0600 llvmpipe: remove unused vars commit e2ca8d1328316dc8b36d5f688c16d109e49a6870 Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 18:53:11 2010 -0600 llvmpipe: checkpoint WIP: overhaul texture/surface mapping Conversion between tiled and linear surfaces is working everywhere now. The LP_TEXTURE_READ/READ_WRITE/WRITE_ALL flags let us avoid unnecessary image layout conversions. Still some loose ends, temporary/debug code, etc. Need to implement tiled/linear conversion for depth/stencil images. commit f2730a03839ee8984c1f537b7cbebba24961397a Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:41:58 2010 -0600 llvmpipe: rename/repurpose lp_rast_store_color() commit e192a47552c5d20d2caef452ca7697e2cd852c9b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:38:51 2010 -0600 llvmpipe: remove lp_rast_load_color() commit 3cff0bde4b4ab980e1c3e812700419091527c76b Author: Brian Paul <brianp@vmware.com> Date: Mon Mar 22 14:11:38 2010 -0600 llvmpipe: remove/consolidate texture image code commit 3a2f08b6a550c69ef5e874f482be30252cbf8bfa Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 17:03:14 2010 -0600 llvmpipe: checkpoint WIP: directly render to tiled texture buffers We're now directly writing colors into the tiled texture image buffers. This is a checkpoint commit with lots of dead code and temporary hacks. Everything will get cleaned up eventually. commit c5ca987e03870849514d4e3c99af143722a09695 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 16:41:14 2010 -0600 llvmpipe: refactor code, create tile_pixel_offset() commit 2133e8273e937cbac09cd7264d6ce53af9764ddb Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:55:11 2010 -0600 llvmpipe: pass LP_TEXTURE_LINEAR/TILED flags around commit b9b9d4b82b01f4588721fdc8444740f859b4a021 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 14:51:05 2010 -0600 llvmpipe: checkpoint WIP: hanlde co-existing tiled/linear texture data Cube maps are temporarily broken, maybe other things. commit 4cd322e6889940b5f155fcb69041b685b9ef9273 Author: Brian Paul <brianp@vmware.com> Date: Fri Mar 19 11:34:43 2010 -0600 progs/demos: add other modes/patterns to dissolve demo
2010-04-16 16:10:54 +01:00
unsigned i;
/* Set exit_flag and signal each thread's work_ready semaphore.
* Each thread will be woken up, notice that the exit_flag is set and
* break out of its main loop. The thread will then exit.
*/
rast->exit_flag = TRUE;
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_signal(&rast->tasks[i].work_ready);
}
/* Wait for threads to terminate before cleaning up per-thread data */
for (i = 0; i < rast->num_threads; i++) {
pipe_thread_wait(rast->threads[i]);
}
/* Clean up per-thread data */
for (i = 0; i < rast->num_threads; i++) {
pipe_semaphore_destroy(&rast->tasks[i].work_ready);
pipe_semaphore_destroy(&rast->tasks[i].work_done);
}
/* for synchronizing rasterization threads */
pipe_barrier_destroy( &rast->barrier );
2010-04-28 22:22:43 +01:00
lp_scene_queue_destroy(rast->full_scenes);
FREE(rast);
}
/** Return number of rasterization threads */
unsigned
lp_rast_get_num_threads( struct lp_rasterizer *rast )
{
return rast->num_threads;
}