summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
Commit message (Collapse)AuthorAgeFilesLines
* svga: add missing cases for PIPE_CAP_x queriesBrian Paul2012-04-061-7/+42
| | | | | | | | | Return 0 for features we don't support. Added debug_printf() warnings when we fail to handle a new PIPE_CAP_x case. That will alert us to interfaces changes in the future. We don't want to just ignore new PIPE_CAPs and possibly miss something important. Reviewed-by: José Fonseca <[email protected]>
* svga: return 1 for PIPE_CAP_VERTEX_COLOR_UNCLAMPED queryBrian Paul2012-04-061-0/+7
| | | | | | | | | | | Before, we weren't clamping the vertex colors produced by ARB vertex programs. This could result in some rendering being too bright (in ETQW, for example). Also add cases for PIPE_CAP_VERTEX_COLOR_CLAMPED and PIPE_CAP_FRAGMENT_COLOR_CLAMPED with comments to be complete. Reviewed-by: José Fonseca <[email protected]>
* svga: handle TGSI_SEMANTIC_CLIPDIST/VERTEX semanticsBrian Paul2012-04-061-0/+7
| | | | | | | We can't support these vertex attributes, but don't die in an assertion. Issue a warning instead. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48142
* gallium: adapt to get_query_result interface changeMarek Olšák2012-03-301-3/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/drivers: Use automake to generate makefileTom Stellard2012-03-141-0/+3
|
* svga: Disable bogus assertions concerning min_index/max_index.José Fonseca2012-03-091-8/+7
| | | | | | | min_index/max_index are merely conservative guesses, so we can't make buffer overflow detection based on their values. Tested-by: Jakob Bornecrantz <[email protected]>
* svga: add null vs pointer check in update_need_pipeline()Brian Paul2012-03-091-1/+1
| | | | | | | | | | | | | Based on a patch submitted by Vic Lee. The other part of his patch which checked the fs pointer wasn't needed. This fixes a crash when clear() is called before any VS or FS is set. But this can only happen when the driver is used without the Mesa state tracker. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: fix the rasterizer state resetsZack Rusin2012-03-071-2/+2
| | | | | | | | | | | draw module calls back into the driver and sets certain parts of the state to whatever it needs, unfortunately unless you get the ordering of calls to draw just right you'll end up reseting your own driver state. That's what was happening to us draw module would under certain conditions reset our own driver state. Reviewed-by: Brian Paul <[email protected]>
* Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"Marek Olšák2012-03-052-5/+1
| | | | | | | This reverts commit 0950086376b1c8b7fb89eda81ed7f2f06dee58bc. It was decided to refactor the transfer API instead of adding workarounds to address the performance issues.
* svga: fix max_lod clamping in update_tss_binding()Brian Paul2012-02-291-2/+2
| | | | | | | | | After biasing we need to clamp to be sure we don't exceed the number of levels in the mipmap. This fixes an assertion at svga_sampler_view.c:70 v2: simplify the biasing, clamping code per Jose's suggestion. Reviewed-by: José Fonseca <[email protected]>
* svga: Advertise SVGA3D_DEVCAP_MAX_POINT_SIZE.José Fonseca2012-02-284-7/+15
| | | | | | | | | | | Backends usually advertise a SVGA3D_DEVCAP_MAX_POINT_SIZE between 63 and 256, so an hardcoded max point size of 80 is often incorrect. This limitation does not apply for anti-aliased points (as they are done via draw module) but we still advertise the same limit for both, because all others pipe drivers do. Reviewed-by: Brian Paul <[email protected]>
* svga: Remove unused SVGA_TEX_UNITS constant.José Fonseca2012-02-271-1/+0
|
* svga: Clamp advertised PIPE_SHADER_CAP_MAX_TEMPS to SVGA3D_TEMPREG_MAX.José Fonseca2012-02-271-2/+2
| | | | | | | | Some backends may advertise more temps than SVGA3D_TEMPREG_MAX, but the driver is hardwired to only support up to the value defined by SVGA3D_TEMPREG_MAX, so clamp to it. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_SHADER_CAP_OUTPUT_READMarek Olšák2012-02-271-4/+0
| | | | | | | | | | | | r600g is the only driver which has made use of it. The reason the CAP was added was to fix some piglit tests when the GLSL pass lower_output_reads didn't exist. However, not removing output reads breaks the fallback for glClampColorARB, which assumes outputs are not readable. The fix would be non-trivial and my personal preference is to remove the CAP, considering that reading outputs is uncommon and that we can now use lower_output_reads to fix the issue that the CAP was supposed to workaround in the first place.
* svga: Fix stencil op mappingZack Rusin2012-02-241-4/+4
| | | | | | | | | We were inverting the meaning of the stencil op flags: in svga/d3d the normal incr/decr wraps and the SAT ops clamp. This fixes piglit failures (at least stencil-twoside and stencil-wrap). We should backport this everywhere we can. Reviewed-by: Brian Paul <[email protected]>
* svga: fix use of SVGA3D_x vs. PIPE_FORMAT_x in svga_is_format_supported()Brian Paul2012-02-241-2/+2
| | | | | | | | | Two of the switch cases used PIPE_FORMAT_ tokens instead of SVGA3D_ tokens. As it happens, the token values are equal for these formats so there's no net change. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: no-op sampler view referencing if no changeBrian Paul2012-02-231-6/+8
| | | | Just to be safe with ref counting and avoid atomic operations.
* svga: use pipe_sampler_view_release() to avoid segfaultBrian Paul2012-02-231-2/+6
| | | | | | | This fixes another case of faulting when freeing a pipe_sampler_view that belongs to a previously destroyed context. Reviewed-by: Jose Fonseca <[email protected]>
* svga: re-enable deleted surface cachingBrian Paul2012-02-231-2/+1
| | | | | | | | Basically, instead of immediately freeing deleted surfaces, hang onto them in a cache to do quick re-allocation. This helps when surfaces are frequently destroyed and then reallocated a bit later. Reviewed-by: José Fonseca <[email protected]>
* svga: implement surface cache size limitBrian Paul2012-02-232-3/+137
| | | | | | | | | | | | | There was a SVGA_HOST_SURFACE_CACHE_BYTES symbol, but it was never used. Now when we go to add a newly deleted surface to the cache we check if the cache size would be exceeded. If so, try to free the least recently "unused" surfaces until the cache is smaller. If we can't do that, simply don't cache the newly deleted surface. The alternative involves flushing and waiting and we don't want to do that. Reviewed-by: José Fonseca <[email protected]>
* svga: add svga_format_size() functionBrian Paul2012-02-232-0/+163
| | | | Reviewed-by: José Fonseca <[email protected]>
* svga: use dummy shaders when translation failsBrian Paul2012-02-232-4/+95
| | | | | | | | | Before, if shader translation failed for any reason we'd keep trying to translate the shader over and over again during state validation. The dummy fragment shader emits solid red so that might be visual clue that translation is failing. Reviewed-by: Jose Fonseca <[email protected]>
* svga: move temp register index assertionsBrian Paul2012-02-232-6/+17
| | | | | | | | | | | | | | The assertion recently added in dst_register() was invalid because that function is also (suprisingly) used to declare constant registers. Move the assertion to the callers where we're really creating temp registers and add some code to prevent emitting invalid temp register indexes for release builds. Also, update the comment for get_temp(). It didn't return -1 if it ran out of registers and none of the callers checked for that. Reviewed-by: Jose Fonseca <[email protected]>
* svga: check that we don't exceed temp register limitBrian Paul2012-02-232-0/+6
| | | | | | | And assert on the register index in dst_register(). The dest can only be an output or temp reg and there's more of the later. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: remove unused winsys pointers in pipe_screen and pipe_contextMarek Olšák2012-02-211-1/+0
| | | | A winsys is already a private object of a driver.
* gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONChristoph Bumiller2012-02-091-0/+3
| | | | | | | Just let the hardware do it if it can and avoid drivers having to check for the special case on each draw call. v2: update the draw module
* svga: fix a crash happening before setting fragment shaders.Zack Rusin2012-02-011-1/+2
| | | | | | | | | | | In certain situations API's will call pipe->clear which doesn't require fragment shader, but then we'd try to verify the pipeline and assume fragment shader was always set. This was leading to crash when API would just call simple clear's before anything else. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa pointsMarek Olšák2012-01-311-2/+4
| | | | v2: add the helper function, improve the condition
* svga: reset vertex buffer offset in svga_release_user_upl_buffers()Brian Paul2012-01-261-0/+11
| | | | | | | | | | | | | | This function releases the buffer that contains user-space vertex data. The buffer_offset field points into that buffer. So reset the buffer_offset to zero when we release the buffer so that subsequent draws don't inadvertantly get a bad offset. Fixes error messages / failed assertions (in the draw module's bounds/size checking code) when running piglit's polygon-mode test. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: fix typedef conflicts on HaikuAlexander von Gluck2012-01-241-0/+4
| | | | | | NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Brian Paul <[email protected]>
* svga: move svga_texture() casts/calls in svga_surface_copy()Brian Paul2012-01-191-2/+4
| | | | | | | | | | | | | | To fix failed assertions when calling glCopyBufferSubData(). svga_texture() asserts that the resource is a texture. Simply move the calls to svga_texture() after the code that handles non-texture copies so that we don't call it with non-texture resources. Fixes glean bufferObject failure. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: change PIPE_CAPF_MAX_TEXTURE_LOD_BIAS from 16.0 to 15.0Brian Paul2012-01-181-1/+1
| | | | | | | | | The legal range for the device is apparently [-16.0, +15.0]. Limiting the range to [-15, +15] fixes piglit's lodbias test. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: fix min/max lod clampingBrian Paul2012-01-181-4/+6
| | | | | | | | | | The interaction between the mipmap lod min/max limits and the texture base/max level limits is kind of tricky. Changing the base level didn't work as expected before. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: add 0.5 in float->int conversion of sample min/max lodBrian Paul2012-01-181-2/+2
| | | | | | | | This makes lod clamping more consistent with other drivers. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* svga: Fix user clip planes.José Fonseca2012-01-122-4/+3
| | | | | | | | Dirty flags also need to be updated in face of recent interface change. Fixes regression in compiz. Reviewed-by: Brian Paul <[email protected]>
* gallium/svga: Pass the SVGA3D_SURFACE_HINT_RENDERTARGET flag to the deviceThomas Hellstrom2012-01-121-3/+6
| | | | | | | | Some hardware versions rely on it to render correctly. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: don't reference count svga_sampler_view's textureBrian Paul2012-01-111-2/+12
| | | | | | | | | | | | | | | | svga_sampler_view contains a pointer to a pipe_resource (base class of svga_texture) and svga_texture contains a pointer to an svga_sampler_view. This circular dependency prevented the objects from ever being freed when they pointed to each other. Make the svga_sampler_view::texture pointer a "weak reference" (no reference counting) to break the dependency. This is safe to do because the pipe_resource/texture always has a longer lifespan than the sampler view so when svga_sampler_view stops referencing the texture, the texture's refcount never hits zero. Fixes a memory leak seen with google earth and other apps. Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: Add somewhat sensible fallback and silence warningJakob Bornecrantz2012-01-101-3/+2
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: Silence warningJakob Bornecrantz2012-01-101-7/+0
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: Silence warningJakob Bornecrantz2012-01-101-0/+3
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* gallium: make vbuf_render::set_primitive() return voidBrian Paul2012-01-071-3/+1
| | | | All the implementations of this function always return TRUE.
* svga: fix assorted whitespace issues, add copyright commentBrian Paul2012-01-073-78/+85
|
* svga: add switch cases for PIPE_SHADER_CAP_OUTPUT_READBrian Paul2012-01-071-0/+4
| | | | | Silences unhandled switch case warning. Return 0 since we don't want to read from output regs.
* gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLYMarek Olšák2012-01-052-1/+5
| | | | | | | | | | | Please see the diff for further info. This paves the way for moving user buffer uploads out of drivers and should allow to clean up the mess in u_upload_mgr in the meantime. For now only allowed for buffers on r300 and r600. Acked-by: Christian König <[email protected]>
* gallium: remove deprecated PIPE_TRANSFER_DISCARDMarek Olšák2012-01-052-2/+2
| | | | PIPE_TRANSFER_DISCARD_RANGE is defined the same.
* u_upload_mgr: remove the 'flushed' parameterMarek Olšák2012-01-052-6/+2
| | | | | | Not used by anybody. Reviewed-by: Brian Paul <[email protected]>
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-051-0/+1
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* svga: Fix texture cube param capJakob Bornecrantz2012-01-051-2/+2
| | | | | | | Spotted by Thomas Hellstrom. Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-16/+21
| | | | | | | | | | | | | | | The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.