aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_scene.c
Commit message (Collapse)AuthorAgeFilesLines
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-141-1/+1
| | | | | | | | | | | | | | | To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* llvmpipe: improve rasterization discard logicRoland Scheidegger2018-05-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | This unifies the explicit rasterization discard as well as the implicit rasterization disabled logic (which we need for another state tracker), which really should do the exact same thing. We'll now toss out the prims early on in setup with (implicit or explicit) discard, rather than do setup and binning with them, which was entirely pointless. (We should eventually get rid of implicit discard, which should also enable us to discard stuff already in draw, hence draw would be able to skip the pointless clip and fallback stages in this case.) We still need separate logic for only null ps - this is not the same as rasterization discard. But simplify the logic there and don't count primitives simply when there's an empty fs, regardless of depth/stencil tests, which seems perfectly acceptable by d3d10. While here, also fix statistics for primitives if face culling is enabled. No piglit changes. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12. Replace was done with: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | | pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/drivers: Sanitize NULL checks into canonical formEdward O'Callaghan2015-12-061-1/+1
| | | | | | | | | | Use NULL tests of the form `if (ptr)' or `if (!ptr)'. They do not depend on the definition of the symbol NULL. Further, they provide the opportunity for the accidental assignment, are clear and succinct. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* llvmpipe: simplify address calculation for 4x4 blocksRoland Scheidegger2015-03-281-0/+3
| | | | | | | | | | | | | | These functions looked quite complicated, even though what they actually did was trivial (ever since we dropped swizzled rendering). Also drop lookup of format block per bytes done for each block, and do it once per scene instead. This improves everybody's favorite "benchmark" by 3% or so, though lp_rast_shade_quads_all() which calls this shows up still quite high for a function which does little more than call the jit function. (This would most likely be much better handled by the jit function itself, the strides are passed through anyway already, though for being able to handle layers it would definitely add some complexity.) Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Replace u_simple_list.h with util/simple_list.hEric Anholt2015-01-281-1/+1
| | | | | | | The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. Reviewed-by: Marek Olšák <[email protected]>
* llvmpipe: fix clearing of individual color buffers in a fbRoland Scheidegger2014-04-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL (3.0) allows you to clear individual color buffers in a fb. In fact for fbs containing both int and float/normalized color buffers this is required (because the clearing values are otherwise undefined if applied to all buffers). The gallium interface was changed a while ago, but llvmpipe ignored it (hence doing such individual clears always resulted in clearing all buffers, plus some assorted asserts due to the mixed fbs). So change the clear command to indicate the buffer to be cleared. Also, because indicating the buffer to be cleared would have made lp_rast_arg_cmd larger which is unacceptable (we're trying to shrink it some day) allocate the clear value in the scene and just pass a pointer. There's several advantages and disadvantages here: + clearing individual buffers works (we could also actually bin such clears now if they'd come through clear_render_target() if the surface is in the current fb, though we didn't do this before for the single rb case and still don't try). + since there's one clear per rb, we do the format conversion in setup rather than per bin. Aside from the (drop in the ocean...) performance advantage this means that clearing to very small values (that is, denormal when converted to the format) should work for small float (fp16 etc.) formats, as the util code couldn't handle it correctly before (because cpu denorms are disabled when executing the bin commands, screwing up the magic conversion and flushing the values to 0, though this was not verified). - there's some overhead for traditional old-style clear-all MRT cases, since there's one rast clear command per rb instead of one for all rbs. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=76976. v2: get rid of the ugly manual memcpy stuff and just use union util_color. This is 32 bytes instead of 16 but as the allocation is per scene we can live with those additional 16 bytes (and the additional 128 bytes in the setup context), which makes the code much more obvious. Suggested by Brian. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: handle NULL color buffer pointersBrian Paul2014-01-171-6/+17
| | | | | | | | | Fixes regression from 9baa45f78b8ca7d66280e36009b6a685055d7cd6 v2: incorporate a few small changes suggested by Roland. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: fix bogus layer clamping in setupRoland Scheidegger2013-10-291-7/+24
| | | | | | | | | | | | | | | | | | | | | The layer coming from GS needs to be clamped (not sure if that's actually the correct error behavior but we need something) as the number can be higher than the amount of layers in the fb. However, this code was using the layer calculation from the scene, and this was actually calculated in lp_scene_begin_rasterization() hence too late (so setup was using the value from the _previous_ scene or just zero if it was the first scene). Since the value is used in both rasterization and setup, move calculation up to lp_scene_begin_binning() though it's a bit more inconvenient to calculate there. (Theoretically could move _all_ code which was in lp_scene_begin_rasterization() to there, because ever since we got rid of swizzled render/depth buffers our "map" functions preparing the fb data for render don't actually change the data in there at all, but it feels like it would be a hack.) v2: improve comments Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: add support for layered renderingRoland Scheidegger2013-06-071-2/+10
| | | | | | | | | | | | | | | | Mostly just make sure the layer parameter gets passed through to the right places (and get clamped, can do this at setup time), fix up clears to clear all layers and disable opaque optimization. Luckily don't need to touch the jitted code. (Clears invoked via pipe's clear_render_target method will not work however since the pipe_util_clear function used for it doesn't handle clearing multiple layers yet.) v2: per Brian's suggestion, prettify var initialization and add some comments, add assertion for impossible layer specification for surface. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: reduce alignment requirement for 1d resources from 4x4 to 4x1Roland Scheidegger2013-06-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For rendering to buffers, we cannot have any y alignment. So make sure that tile clear commands only clear up to the fb width/height, not more (do this for all resources actually as clearing more seems pointless for other resources too). For the jit fs function, skip execution of the lower half of the fragment shader for the 4x4 stamp completely, for depth/stencil only load/store the values from the first row (replace other row with undef). For the blend function, also only load half the values from fs output, replace the rest with undefs so that everything still operates on the full 4x4 block to keep code the same between 4x1 and 4x4 (except for load/store of course which also needs to skip (store) or replace these values with undefs (load))., at the cost of slightly less optimal code being produced in some cases. Also reduce 1d and 1d array alignment too, because they can be handled the same as buffers so don't need to waste memory. v2: don't try to run special blend code for 4x1, (very) slightly less complexity if we just use the same code as for 4x4 which may or may not make it easier to optimize in the future (as we care a lot more about 4x4 performance than 1d). v2: don't use undef values for unused fs src outputs with llvm 3.1 as it apparently can trigger a bug in llvm. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: reduce alignment requirement for resources from 64x64 to 4x4Roland Scheidegger2013-05-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The overallocation was very bad especially for things like 1d array textures which got blown up by a factor of 64. (Even ordinary smallish 2d textures benefit a lot from this, a mipmapped 64x64 rgba8 texture previously used 7*16kB = 112kB instead of now ~22kB.) 4x4 is chosen because this is the size the jit functions run on, so making it smaller is going to be a bit more complicated. It is actually not strictly 4x4 pixel, since we'd want to avoid situations where different threads are rendering to the same cacheline so we keep cacheline size alignment in x direction (often 64bytes). To make this work introduce new task width/height parameters and make sure clears don't clear the whole tile if it's a partial tile. Likewise, the rasterizer may produce fragments outside the 4x4 blocks present in a tile, so don't call the jit function for them. This does not yet fix rendering to buffers (which cannot have any y alignment at all), and 1d/1d array textures are still overallocated by a factor of 4. v2: replace magic number 4 with LP_RASTER_BLOCK_SIZE, fix size of buffers allocated (needed in case we render to them). Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: Remove x/y from cmd_binAdam Jackson2013-05-311-1/+3
| | | | | | | | | | These were mostly just a waste of memory and cache pressure, and were really only used for debugging. This change reduces instruction count (as measured by callgrind's Ir event) of gnome-shell-perf-tool on Ivybridge by 3.5% ± 0.015% (n=20). Signed-off-by: Adam Jackson <[email protected]>
* llvmpipe: get rid of tiled/linear layout remainsRoland Scheidegger2013-05-291-4/+2
| | | | | | | Eliminate the rest of the no longer needed layout logic. (It is possible some code could be simplified a bit further still.) Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: get rid of depth swizzling.Roland Scheidegger2013-05-031-1/+1
| | | | | | | | | | | | | | | Eliminating this we no longer need to copy between linear and swizzled layout. This is probably not quite ideal since it's a bit more work for now, could do some optimizations by moving depth testing outside the fragment shader loop (but tricky for early depth test as we don't have neither the mask nor the interpolated z in the right order handy). The large amount of tile/untile code is no longer needed will be deleted in next commit. No piglit regressions. v2: change a forgotten LAYOUT_NONE to LAYOUT_LINEAR. v3: fix (bogus) uninitialized variable warnings, add comments, fix a bad type Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: don't assert when trying to render to surfaces with multiple layersRoland Scheidegger2013-03-141-2/+0
| | | | | | | instead just warn when creating the surface, rendering will simply happen to first layer. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: remove the power of two sizeof(struct cmd_block) assertionBrian Paul2013-03-071-7/+0
| | | | | | | It fails on 32-bit systems (I only tested on 64-bit). Power of two size isn't required, so just remove the assertion. Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: add some scene limit sanity check assertionsBrian Paul2013-03-061-0/+22
| | | | | | Note: This is a candidate for the stable branches. Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: support rendering to buffer render targets.Roland Scheidegger2013-02-281-12/+23
| | | | | | | | | | Unfortunately not usable from OpenGL, and no cap bit. Pretty similar to a 1d texture, though allows specifying a start element. v2: also fix up renderbuffer width (which will get promoted to fb width) to be the number of elements Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: EXT_transform_feedback support (v1.1)Dave Airlie2012-12-061-1/+2
| | | | | | | | | | | | I'd written most of this ages ago, but never finished it off. This passes 115/130 piglit tests so far. I'll look into the others as time permits. v1.1: fix calloc return check as suggested by Jose. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* llvmpipe: Eliminate color buffer swizzling.José Fonseca2012-11-291-2/+0
| | | | | | | | | | | | Now dead code. Also had to remove the show_tiles/show_subtiles because now the color buffers are always stored in their native format, so there is no longer an easy way to paint the tile sizes. Depth-stencil buffers are still swizzled. Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Unswizzled rendering.James Benton2012-11-281-0/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: Also reset the state in lp_scene_bin_resetJosé Fonseca2011-09-291-0/+1
| | | | Prevents segfaults when a opaque tile is found without state change.
* llvmpipe: Plug fence leaks.José Fonseca2010-12-091-0/+1
|
* gallium: support for array textures and related changesRoland Scheidegger2010-12-021-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resources have a array_size parameter now. get_tex_surface and tex_surface_destroy have been renamed to create_surface and surface_destroy and moved to context, similar to sampler views (and create_surface now uses a template just like create_sampler_view). Surfaces now really should only be used for rendering. In particular they shouldn't be used as some kind of 2d abstraction for sharing a texture. offset/layout fields don't make sense any longer and have been removed, width/height should go too. surfaces and sampler views now specify a layer range (for texture resources), layer is either array slice, depth slice or cube face. pipe_subresource is gone array slices (or cube faces) are now treated the same as depth slices in transfers etc. (that is, they use the z coord of the respective functions). Squashed commit of the following: commit a45bd509014743d21a532194d7b658a1aeb00cb7 Merge: 1aeca28 32e1e59 Author: Roland Scheidegger <[email protected]> Date: Thu Dec 2 04:32:06 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/i915/i915_resource_texture.c src/gallium/drivers/i915/i915_state_emit.c src/gallium/drivers/i915/i915_surface.c commit 1aeca287a827f29206078fa1204715a477072c08 Merge: 912f042 6f7c8c3 Author: Roland Scheidegger <[email protected]> Date: Thu Dec 2 00:37:11 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/state_trackers/vega/api_filters.c src/gallium/state_trackers/vega/api_images.c src/gallium/state_trackers/vega/mask.c src/gallium/state_trackers/vega/paint.c src/gallium/state_trackers/vega/renderer.c src/gallium/state_trackers/vega/st_inlines.h src/gallium/state_trackers/vega/vg_context.c src/gallium/state_trackers/vega/vg_manager.c commit 912f042e1d439de17b36be9a740358c876fcd144 Author: Roland Scheidegger <[email protected]> Date: Wed Dec 1 03:01:55 2010 +0100 gallium: even more compile fixes after merge commit 6fc95a58866d2a291def333608ba9c10c3f07e82 Author: Roland Scheidegger <[email protected]> Date: Wed Dec 1 00:22:26 2010 +0100 gallium: some fixes after merge commit a8d5ffaeb5397ffaa12fb422e4e7efdf0494c3e2 Merge: f7a202f 2da02e7 Author: Roland Scheidegger <[email protected]> Date: Tue Nov 30 23:41:26 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/i915/i915_state_emit.c src/gallium/state_trackers/vega/api_images.c src/gallium/state_trackers/vega/vg_context.c commit f7a202fde2aea2ec78ef58830f945a5e214e56ab Author: Roland Scheidegger <[email protected]> Date: Wed Nov 24 19:19:32 2010 +0100 gallium: even more fixes/cleanups after merge commit 6895a7f969ed7f9fa8ceb788810df8dbcf04c4c9 Author: Roland Scheidegger <[email protected]> Date: Wed Nov 24 03:07:36 2010 +0100 gallium: more compile fixes after merge commit af0501a5103b9756bc4d79167bd81051ad6e8670 Author: Roland Scheidegger <[email protected]> Date: Tue Nov 23 19:24:45 2010 +0100 gallium: lots of compile fixes after merge commit 0332003c2feb60f2a20e9a40368180c4ecd33e6b Merge: 26c6346 b6b91fa Author: Roland Scheidegger <[email protected]> Date: Tue Nov 23 17:02:26 2010 +0100 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/gallivm/lp_bld_sample.c src/gallium/auxiliary/util/u_blit.c src/gallium/auxiliary/util/u_blitter.c src/gallium/auxiliary/util/u_inlines.h src/gallium/auxiliary/util/u_surface.c src/gallium/auxiliary/util/u_surfaces.c src/gallium/docs/source/context.rst src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/nv50/nv50_state_validate.c src/gallium/drivers/nvfx/nv04_surface_2d.c src/gallium/drivers/nvfx/nv04_surface_2d.h src/gallium/drivers/nvfx/nvfx_buffer.c src/gallium/drivers/nvfx/nvfx_miptree.c src/gallium/drivers/nvfx/nvfx_resource.c src/gallium/drivers/nvfx/nvfx_resource.h src/gallium/drivers/nvfx/nvfx_state_fb.c src/gallium/drivers/nvfx/nvfx_surface.c src/gallium/drivers/nvfx/nvfx_transfer.c src/gallium/drivers/r300/r300_state_derived.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r600/r600_blit.c src/gallium/drivers/r600/r600_buffer.c src/gallium/drivers/r600/r600_context.h src/gallium/drivers/r600/r600_screen.c src/gallium/drivers/r600/r600_screen.h src/gallium/drivers/r600/r600_state.c src/gallium/drivers/r600/r600_texture.c src/gallium/include/pipe/p_defines.h src/gallium/state_trackers/egl/common/egl_g3d_api.c src/gallium/state_trackers/glx/xlib/xm_st.c src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c src/gallium/targets/libgl-gdi/libgl_gdi.c src/gallium/tests/graw/tri.c src/mesa/state_tracker/st_cb_blit.c src/mesa/state_tracker/st_cb_readpixels.c commit 26c6346b385929fba94775f33838d0cceaaf1127 Author: Roland Scheidegger <[email protected]> Date: Mon Aug 2 19:37:21 2010 +0200 fix more merge breakage commit b30d87c6025eefe7f6979ffa8e369bbe755d5c1d Merge: 9461bf3 1f1928d Author: Roland Scheidegger <[email protected]> Date: Mon Aug 2 19:15:38 2010 +0200 Merge remote branch 'origin/master' into gallium-array-textures Conflicts: src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/llvmpipe/lp_rast_priv.h src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_screen_buffer.c src/gallium/drivers/r300/r300_state_derived.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_texture.h src/gallium/drivers/r300/r300_transfer.c src/gallium/drivers/r600/r600_screen.c src/gallium/drivers/r600/r600_state.c src/gallium/drivers/r600/r600_texture.c src/gallium/drivers/r600/r600_texture.h src/gallium/state_trackers/dri/common/dri1_helper.c src/gallium/state_trackers/dri/sw/drisw.c src/gallium/state_trackers/xorg/xorg_exa.c commit 9461bf3cfb647d2301364ae29fc3084fff52862a Merge: 17492d7 0eaccb3 Author: Roland Scheidegger <[email protected]> Date: Thu Jul 15 20:13:45 2010 +0200 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/util/u_blitter.c src/gallium/drivers/llvmpipe/lp_rast.c src/gallium/drivers/llvmpipe/lp_surface.c src/gallium/drivers/r300/r300_render.c src/gallium/drivers/r300/r300_state.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_transfer.c src/gallium/tests/trivial/quad-tex.c commit 17492d705e7b7f607b71db045c3bf344cb6842b3 Author: Roland Scheidegger <[email protected]> Date: Fri Jun 18 10:58:08 2010 +0100 gallium: rename element_offset/width fields in views to first/last_element This is much more consistent with the other fields used there (first/last level, first/last layer). Actually thinking about removing the ugly union/structs again and rename first/last_layer to something even more generic which could also be used for buffers (like first/last_member) without inducing headaches. commit 1b717a289299f942de834dcccafbab91361e20ab Author: Roland Scheidegger <[email protected]> Date: Thu Jun 17 14:46:09 2010 +0100 gallium: remove PIPE_SURFACE_LAYOUT_LINEAR definition This was only used by the layout field of pipe_surface, but this driver internal stuff is gone so there's no need for this driver independent layout definition neither. commit 10cb644b31b3ef47e6c7b55e514ad24bb891fac4 Merge: 5691db9 c85971d Author: Roland Scheidegger <[email protected]> Date: Thu Jun 17 12:20:41 2010 +0100 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/docs/source/glossary.rst src/gallium/tests/graw/fs-test.c src/gallium/tests/graw/gs-test.c commit 5691db960ca3d525ce7d6c32d9c7a28f5e907f3b Author: Roland Scheidegger <[email protected]> Date: Thu Jun 17 11:29:03 2010 +0100 st/wgl: fix interface changes bugs commit 2303ec32143d363b46e59e4b7c91b0ebd34a16b2 Author: Roland Scheidegger <[email protected]> Date: Wed Jun 16 19:42:32 2010 +0100 gallium: adapt code to interface changes... commit dcae4f586f0d0885b72674a355e5d56d47afe77d Author: Roland Scheidegger <[email protected]> Date: Wed Jun 16 19:42:05 2010 +0100 gallium: separate depth0 and array_size in the resource itself. These fields are still mutually exclusive (since no 3d array textures exist) but it ultimately seemed to error-prone to adapt all code accept the new meaning of depth0 (drivers stick that into hardware regs, calculate mipmap sizes etc.). And it isn't really cleaner anyway. So, array textures will have depth0 of 1, but instead use array_size, 3D textures will continue to use depth0 (and have array_size of 1). Cube maps also will use array_size to indicate their 6 faces, but since all drivers should just be fine by inferring this themselves from the fact it's a cube map as they always used to nothing should break. commit 621737a638d187d208712250fc19a91978fdea6b Author: Roland Scheidegger <[email protected]> Date: Wed Jun 16 17:47:38 2010 +0100 gallium: adapt code to interface changes There are still usages of pipe_surface where pipe_resource should be used, which should eventually be fixed. commit 2d17f5efe166b2c3d51957c76294165ab30b8ae2 Author: Roland Scheidegger <[email protected]> Date: Wed Jun 16 17:46:14 2010 +0100 gallium: more interface changes In particular to enable usage of buffers in views, and ability to use a different pipe_format in pipe_surface. Get rid of layout and offset parameter in pipe_surface - the former was not used in any (public) code anyway, and the latter should either be computed on-demand or driver can use subclass of pipe_surface. Also make create_surface() use a template to be more consistent with other functions. commit 71f885ee16aa5cf2742c44bfaf0dc5b8734b9901 Merge: 3232d11 8ad410d Author: Roland Scheidegger <[email protected]> Date: Mon Jun 14 14:19:51 2010 +0100 Merge commit 'origin/master' into gallium-array-textures Conflicts: src/gallium/auxiliary/util/u_box.h src/gallium/drivers/nv50/nv50_surface.c src/gallium/drivers/nvfx/nvfx_surface.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_texture.c src/gallium/drivers/r300/r300_transfer.c src/gallium/drivers/r600/r600_blit.c src/gallium/drivers/r600/r600_screen.h src/gallium/include/pipe/p_state.h commit 3232d11fe3ebf7686286013c357b404714853984 Author: Roland Scheidegger <[email protected]> Date: Mon Jun 14 11:40:04 2010 +0100 mesa/st: adapt to interface changes still need to fix pipe_surface sharing (as that is now per-context). Also broken is depth0 handling - half the code assumes this is also used for array textures (and hence by extension of that cube maps would have depth 6), half the code does not... commit f433b7f7f552720e5eade0b4078db94590ee85e1 Author: Roland Scheidegger <[email protected]> Date: Mon Jun 14 11:35:52 2010 +0100 gallium: fix a couple of bugs in interface chnage fixes commit 818366b28ea18f514dc791646248ce6f08d9bbcf Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:42:11 2010 +0200 targets: adapt to interface changes Yes even that needs adjustments... commit 66c511ab1682c9918e0200902039247793acb41e Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:41:13 2010 +0200 tests: adapt to interface changes Everything needs to be fixed :-(. commit 6b494635d9dbdaa7605bc87b1ebf682b138c5808 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:39:50 2010 +0200 st: adapt non-rendering state trackers to interface changes might not be quite right in all places, but they really don't want to use pipe_surface. commit 00c4289a35d86e4fe85919ec32aa9f5ffe69d16d Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:38:48 2010 +0200 winsys: adapt to interface changes commit 39d858554dc9ed5dbc795626fec3ef9deae552a0 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:26:54 2010 +0200 st/python: adapt to interface changes don't think that will work, sorry. commit 6e9336bc49b32139cec4e683857d0958000e15e3 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:26:07 2010 +0200 st/vega: adapt to interface changes commit e07f2ae9aaf8842757d5d50865f76f8276245e11 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:25:56 2010 +0200 st/xorg: adapt to interface changes commit 05531c10a74a4358103e30d3b38a5eceb25c947f Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:24:53 2010 +0200 nv50: adapt to interface changes commit 97704f388d7042121c6d496ba8c003afa3ea2bf3 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:24:45 2010 +0200 nvfx: adapt to interface changes commit a8a9c93d703af6e8f5c12e1cea9ec665add1abe0 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:24:01 2010 +0200 i965g: adapt to interface changes commit 0dde209589872d20cc34ed0b237e3ed7ae0e2de3 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:22:38 2010 +0200 i915g: adapt to interface changes commit 5cac9beede69d12f5807ee1a247a4c864652799e Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:20:58 2010 +0200 svga: adapt to interface changes resource_copy_region still looking fishy. Was not very suited to unified zslice/face approach... commit 08b5a6af4b963a3e4c75fc336bf6c0772dce5150 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:20:01 2010 +0200 rbug: adapt to interface changes Not sure if that won't need changes elsewhere? commit c9fd24b1f586bcef2e0a6e76b68e40fca3408964 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:19:31 2010 +0200 trace: adapt to interface changes commit ed84e010afc5635a1a47390b32247a266f65b8d1 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:19:21 2010 +0200 failover: adapt to interface changes commit a1d4b4a293da933276908e3393435ec4b43cf201 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:19:12 2010 +0200 identity: adapt to interface changes commit a8dd73e2c56c7d95ffcf174408f38f4f35fd2f4c Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:18:55 2010 +0200 softpipe: adapt to interface changes commit a886085893e461e8473978e8206ec2312b7077ff Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:18:44 2010 +0200 llvmpipe: adapt to interface changes commit 70523f6d567d8b7cfda682157556370fd3c43460 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:18:14 2010 +0200 r600g: adapt to interface changes commit 3f4bc72bd80994865eb9f6b8dfd11e2b97060d19 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:18:05 2010 +0200 r300g: adapt to interface changes commit 5d353b55ee14db0ac0515b5a3cf9389430832c19 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:17:37 2010 +0200 cell: adapt to interface changes not even compile tested commit cf5d03601322c2dcb12d7a9c2f1745e2b2a35eb4 Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:14:59 2010 +0200 util: adapt to interface changes amazing how much code changes just due to some subtle interface changes? commit dc98d713c6937c0e177fc2caf23020402cc7ea7b Author: Roland Scheidegger <[email protected]> Date: Sat Jun 12 02:12:40 2010 +0200 gallium: more interface fail, docs this also changes flush_frontbuffer to use a pipe_resource instead of a pipe_surface - pipe_surface is not meant to be (or at least no longer) an abstraction for standalone 2d images which get passed around. (This has also implications for the non-rendering state-trackers.) commit 08436d27ddd59857c22827c609b692aa0c407b7b Author: Roland Scheidegger <[email protected]> Date: Thu Jun 10 17:42:52 2010 +0200 gallium: fix array texture interface changes bugs, docs commit 4a4d927609b62b4d7fb9dffa35158afe282f277b Author: Roland Scheidegger <[email protected]> Date: Thu Jun 3 22:02:44 2010 +0200 gallium: interface changes for array textures and related cleanups This patch introduces array textures to gallium (note they are not immediately usable without the associated changes to the shader side). Also, this abandons pipe_subresource in favor of using level and layer parameters since the distinction between several faces (which was part of pipe_subresource for cube textures) and several z slices (which were not part of pipe_subresource but instead part of pipe_box where appropriate for 3d textures) is gone at the resource level. Textures, be it array, cube, or 3d, now use a "unified" set of parameters, there is no distinction between array members, cube faces, or 3d zslices. This is unlike d3d10, whose subresource index includes layer information for array textures, but which considers all z slices of a 3d texture to be part of the same subresource. In contrast to d3d10, OpenGL though reuses old 2d and 3d function entry points for 1d and 2d array textures, respectively, which also implies that for instance it is possible to specify all layers of a 2d array texture at once (note that this is not possible for cube maps, which use the 2d entry points, although it is possible for cube map arrays, which aren't supported yet in gallium). This should possibly make drivers a bit simpler, and also get rid of mutually exclusive parameters in some functions (as z and face were exclusive), one potential downside would be that 3d array textures could not easily be supported without reverting this, but those are nowhere to be seen. Also along with adjusting to new parameters, rename get_tex_surface / tex_surface_destroy to create_surface / surface_destroy and move them from screen to context, which reflects much better what those do (they are analogous to create_sampler_view / sampler_view_destroy). PIPE_CAP_ARRAY_TEXTURES is used to indicate if a driver supports all of this functionality (that is, both sampling from array texture as well as use a range of layers as a render target, with selecting the layer from the geometry shader).
* llvmpipe: reintroduce SET_STATE binner commandKeith Whitwell2010-10-151-1/+3
| | | | But bin lazily only into bins which are receiving geometry.
* llvmpipe: cast to silence warningBrian Paul2010-09-151-1/+1
|
* llvmpipe: fix wierd performance regression in isosurfKeith Whitwell2010-09-121-6/+8
| | | | | | | | | | | | I really don't understand the mechanism behind this, but it seems like the way data blocks for a scene are malloced, and in particular whether we treat them as stack or a queue, and whether we retain the most recently allocated or least recently allocated has a real affect (~5%) on isosurf framerates... This is probably specific to my distro or even just my machine, but none the less, it's nicer not to see the framerates go in the wrong direction.
* llvmpipe: Refactor lp_scene_add_resource_referenceJosé Fonseca2010-09-071-14/+15
| | | | Less goto spaghetti.
* llvmpipe: Fix negated logic in lp_scene_add_resource_reference().José Fonseca2010-09-071-1/+1
| | | | Fixes performance regression.
* llvmpipe: rasterization debugging helpersKeith Whitwell2010-09-071-0/+3
|
* llvmpipe: use opcodes instead of function pointers in binsKeith Whitwell2010-09-071-73/+107
| | | | Also, move some state from rasterizer struct to the scene.
* llvmpipe: enforce fixed memory limit on scenesKeith Whitwell2010-09-071-92/+135
|
* llvmpipe: clean up deferred zstencil clearsKeith Whitwell2010-09-071-1/+0
|
* llvmpipe: don't clear unused binsKeith Whitwell2010-08-221-2/+5
| | | | | If bins outside the current scene bounds are being corrupted, we'll need to fix that separately. Currently seems ok though.
* llvmpipe: eliminate the set_state rasterizer commandKeith Whitwell2010-07-131-54/+0
| | | | | | Just put a pointer to the state in the tri->inputs struct. Remove some complex logic for eliminating unused statechanges in bins at the expense of a slightly larger triangle struct.
* llvmpipe: move fences from per-bin to per-threadKeith Whitwell2010-07-131-0/+3
| | | | | | | | | Rather than inserting an lp_rast_fence command at the end of each bin, have each rasterizer thread call this function directly once it has run out of work to do on a particular scene. This results in fewer calls to the mutex & related functions, but more importantly makes it easier to recognize empty bins.
* llvmpipe: ensure all bins are reset avoids memory corruption.Alan Hourihane2010-07-061-2/+2
|
* llvmpipe: adapt to clear interface changesRoland Scheidegger2010-05-291-1/+1
| | | | | with some newfangled code, should support separate depth/stencil clears. Needs some testing.
* llvmpipe: Remove unnecessary headers.Vinson Lee2010-05-041-1/+0
|
* llvmpipe: add some tests for malloc() returning NULL.Brian Paul2010-05-041-10/+16
| | | | | Start propogating NULL pointers from allocation functions and checks for NULL in the callers...
* gallium: move framebuffer utility functions into a new fileBrian Paul2010-05-031-0/+1
|
* llvmpipe: remove unused write_depthBrian Paul2010-04-281-5/+1
|
* llvmpipe: Remove unnecessary header.Vinson Lee2010-04-281-1/+0
|
* llvmpipe: remove lp_scene_map_buffers(), lp_scene_unmap_buffers()Brian Paul2010-04-271-58/+4
|
* llvmpipe: implement max scene sizeBrian Paul2010-04-271-1/+12
| | | | | | | | When the size of the scene (binned data plus referenced resources/textures) exceeds LP_MAX_SCENE_SIZE flush/render the scene. This could be improved in various ways but is a good start. Fixes piglit streaming-texture-leak test.
* gallium: s/free/FREE/ and same for friends.José Fonseca2010-04-231-1/+1
| | | | Based on Stephen Johnson's feedback.