summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* r600g: use u_default_transfer_flush_region for all resource typesMarek Olšák2012-02-273-9/+3
|
* r600g: use u_default_transfer_inline_write for all resource typesMarek Olšák2012-02-273-26/+3
|
* r600g: fix streamout cache flush for r600Marek Olšák2012-02-271-4/+12
| | | | Figured out by trial and error.
* r600g: cleanup r600_transfer_structMarek Olšák2012-02-272-16/+12
| | | | | Especially rename staging_texture to staging and change its type to r600_resource. I will reuse it for buffers later.
* r600g: check for R600_STREAMOUT env var in winsysMarek Olšák2012-02-271-2/+2
|
* r600g: move initialization of use_surface flag into screen_createMarek Olšák2012-02-275-25/+18
| | | | Also change the type to bool and give it a less ambiguous name.
* r600g: properly check whether texture is busy in get_transferMarek Olšák2012-02-271-9/+5
|
* r600g: rename r600_resource_texture::depth to bool is_depthMarek Olšák2012-02-275-16/+16
| | | | It's used as a boolean.
* gallium: remove PIPE_SHADER_CAP_OUTPUT_READMarek Olšák2012-02-276-14/+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.
* r300g: Use automake to generate Makefile v3Tom Stellard2012-02-265-80/+43
| | | | | | | | | | v2: - s/$(top_builddir)/$(top_srcdir)/ - Always generate Makefile.in v3: - Fixes from Matt Turner - Use Mesa CFLAGS
* r300g: Reorganize the compiler unit testsTom Stellard2012-02-264-2/+12
|
* r300/compiler: Schedule KIL instructions before output writesTom Stellard2012-02-261-0/+4
|
* r300/compiler: Use the smart scheduler for r300 cardsTom Stellard2012-02-261-73/+54
|
* r300/compiler: Fix bug when lowering KILP on r300 cardsTom Stellard2012-02-261-10/+54
| | | | | | | | | | | KILP instruction inside IF blocks were being lowered to an unconditional KIL. Since r300 doesn't support branching, when the IF's were lowered to conditional moves, the KIL would always be executed. This is not a problem with the mesa state tracker, because the GLSL compiler handles lowering IF's, but this bug was appearing in the VDPAU state tracker, which does not use the GLSL compiler. Note: This is a candidate for the stable branches.
* i915g: Fix fallout from 8e4540ec2a82e72be491bc8fe23c10551d29a96cStéphane Marchesin2012-02-241-4/+10
| | | | Fixes piglit regressions from that change.
* 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]>
* r600g: rework queriesMarek Olšák2012-02-233-116/+167
| | | | | | | | | | | | | | | | We always mapped the query buffer in begin_query, causing stalls if the buffer was busy. This commit reworks it such that the query buffer is only mapped in get_query_result as it's supposed to be. The query buffer is no longer treated as a ring buffer. Instead, the results are just appended and when the buffer is full, we create a new one. One query can have more than one query buffer, though that's a very rare case. Begin_query releases all query buffers. Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: cleanup magic numbers in set_xx_samplerMarek Olšák2012-02-232-6/+6
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove duplicated evergreen_context_ps_partial_flushMarek Olšák2012-02-233-15/+3
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove duplicated evergreen_context_pipe_state_set_samplerMarek Olšák2012-02-233-31/+5
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove duplicated set_xx_resource functionsMarek Olšák2012-02-234-48/+13
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove duplicated function r600_state_sampler_initMarek Olšák2012-02-233-18/+3
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: fixup name of evergreen-specific functionMarek Olšák2012-02-231-5/+5
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: simplify fail paths in create_contextMarek Olšák2012-02-231-22/+15
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix possible crashes in destroy_context when failing in create_contextMarek Olšák2012-02-232-25/+38
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: consolidate common context init codeMarek Olšák2012-02-233-34/+16
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g: define GROUP_FORCE_NEW_BLOCK in common headerMarek Olšák2012-02-233-4/+2
| | | | | Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[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]>
* r600g: Fix build when libdrm is installed to non-standard dir.Satyajit Sarangi2012-02-221-0/+3
| | | | | Signed-off-by: Satyajit Sarangi<[email protected]> Signed-off-by: Tom Stellard <[email protected]>
* r600g: move invariant register updates into start_cs for evergreen and caymanMarek Olšák2012-02-213-118/+100
|
* r600g: move invariant register updates into start_cs for r6xx-r7xxMarek Olšák2012-02-213-102/+82
|
* r600g: add a depth misc state which depends on occlusion queriesMarek Olšák2012-02-2110-91/+152
| | | | | | | | | | | | | | | | This is a state which is derived from other states and is actually the first state which doesn't correspond to any gallium state. There are two state flags: bool occlusion_query_enabled bool flush_depthstencil_enabled Additional flags can be added later if needed, e.g. bool hiz_enabled. The emit function will have to figure out the register values by itself. It basically just emits the registers when the state changes. This commit also adds a few helper functions for writing registers directly into a command stream.
* r600g: consolidate the main draw codeMarek Olšák2012-02-214-133/+50
| | | | | The code was almost the same for r600 and eg. What can't be consolidated is in the *_prepare functions.
* r600g: move all invariant state from draw_vbo into start_csMarek Olšák2012-02-217-20/+35
|
* r600g: turn init_config into a command buffer for starting a CSMarek Olšák2012-02-2110-479/+379
| | | | | | | | | | | This is the first pure command buffer. It contains CS initialization packets and emits invariant state (i.e. the registers which never or rarely change). The affected registers are removed from *_hw_context.c, so that both ways of emitting commands can co-exist. v2: emit context_control in cayman's start_cs too
* gallium/util: remove u_simple_screenMarek Olšák2012-02-212-2/+0
| | | | Deprecated and unused.
* gallium: remove unused winsys pointers in pipe_screen and pipe_contextMarek Olšák2012-02-2118-32/+0
| | | | A winsys is already a private object of a driver.
* llvmpipe: Remove lp_test_sincos.José Fonseca2012-02-216-909/+8
| | | | Completely replaced by lp_test_arit.