summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* gallivm: fix issues with trunc/round/floor/ceil with no arch roundingRoland Scheidegger2013-02-161-0/+12
| | | | | | | | | | | | | | | | | | | | The emulation of these if there's no rounding instruction available is a bit more complicated than what the code did. In particular, doing fp-to-int/int-to-fp will not work if the exponent is large enough (and with NaNs, Infs). Hence such values need to be filtered out and the original value returned in this case (which fortunately should always be exact). This comes at the expense of performance (if your cpu doesn't support rounding instructions). Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for values near negative (for floor) or positive (for ceil) zero, fix that as well (fixing this issue might not actually be slower except for ceil/iceil if the type is not signed which is probably rare - note iceil has no callers left in any case). Also add some new rounding test values in lp_test_arit to actually test for that stuff (which previously would have failed without sse41). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701.
* trace: add context pointer sanity checkingBrian Paul2013-02-153-0/+23
| | | | | | | To help catch mixed up context pointer bugs in the future, add a trace_context_check() function and some new assertions. Reviewed-by: Jose Fonseca <[email protected]>
* trace: fix incorrect trace_surface::base.context pointerBrian Paul2013-02-153-4/+7
| | | | | | | | | When a trace_surface object is created in trace_surf_create() we weren't correctly setting the surface's context pointer. Instead of it being the trace context, it was the wrapped driver's context. This caused things to blow up sometimes during surface deallocation. Reviewed-by: Jose Fonseca <[email protected]>
* trace: whitespace, comment clean-upsBrian Paul2013-02-151-6/+2
|
* trace: move struct tr_list to tr_texture.hBrian Paul2013-02-152-5/+8
| | | | That's the only place it's used.
* r600g: add support for red-alpha render targetsMarek Olšák2013-02-142-0/+44
|
* r300g: add support for red-alpha render targetsMarek Olšák2013-02-143-0/+20
|
* r600g: properly implement S8Z24 depth-stencil format for EvergreenMarek Olšák2013-02-143-18/+47
| | | | | | | | | | | | | | | | | | | | I should say "fix", but it has never been used until now. S8Z24 is the format equivalent to the GL_UNSIGNED_INT_24_8 packing, so we'll start to see it more often with st/mesa now making smart decisions about formats. The DB<->CB copy can change the channel ordering for transfers, other than that, the internal DB format doesn't really matter. R600-R700 support is possible except shadow mapping. FMT_24_8 is broken if the SAMPLE_C instruction is used (no idea why). Also the sampler swizzling was broken in theory and the fact it worked was a lucky coincidence. radeonsi might need to port this. Reviewed-by: Jerome Glisse <[email protected]>
* radeonsi: Handle TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFSMichel Dänzer2013-02-141-0/+29
| | | | | | 8 more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Fix array indices for detecting integer vertex formatsMichel Dänzer2013-02-141-2/+2
|
* r600g: fix lockup when hyperz & alpha test are enabled together. v3Jerome Glisse2013-02-123-3/+49
| | | | | | | | | | | | Seems that alpha test being enabled confuse the GPU on the order in which it should perform the Z testing. So force the order programmed throught db shader control. v2: Only force z order when alpha test is enabled v3: Update db shader when binding new dsa + spelling fix Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove constant index limitation v3Christian König2013-02-122-7/+1
| | | | | | | | | | With the llvm patches, fixing 14 piglit tests in total. v2: increase the const limit v3: document the const limit Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: support constants as TEX coordinatesChristian König2013-02-121-0/+9
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* nv50: fix bogus parameters when processing sample instructionsRoland Scheidegger2013-02-121-1/+1
| | | | | | | | Discovered accidentally when changing SAMPLE_L definition. Turns out the lod arguments were already correct for the new definition but the compare and derivs were not. Reviewed-by: Christoph Bumiller <[email protected]>
* llvmpipe: implement dual source blendingRoland Scheidegger2013-02-125-93/+210
| | | | | | | | | | | | | link up the fs outputs and blend inputs, and make sure the second blend source is correctly loaded and converted (which is quite complex). There's a slight refactoring of the monster generate_unswizzled_blend() function where it makes sense to factor out alpha conversion (which needs to run twice for dual source blend). This passes piglit arb_blend_func_extended tests. v2: remove new but ultimately not used function... Reviewed-by: Brian Paul <[email protected]>
* r600g: make sure async blit is done 8 * pitch at a time v2Jerome Glisse2013-02-111-6/+7
| | | | | | | | The blit must be aligned on 8 horizontal block. v2: no need to align the reminder Signed-off-by: Jerome Glisse <[email protected]>
* llvmpipe: remove lp_swizzled_cbufAdhemerval Zanella2013-02-113-16/+0
| | | | | | Ununsed since 75da95c5. Reviewed-by: Adam Jackson <[email protected]>
* softpipe: clean up lod computationRoland Scheidegger2013-02-082-70/+93
| | | | | | | | | | | | | | | This should handle the new lod_zero modifier more correctly. The runtime-conditional is a bit more complex however we now also do scalar lod computation when appropriate which should more than make up for it. The refactoring should also fix an issue with explicit lods (lod clamp wasn't applied to them). Also, always pass lod as the 5th element from tgsi executor, which simplifies things (get rid of annoying conditionals later). v2: based on Brian's feedback, use switch in a couple of places, fix up some function parameter names, fix up comments. Reviewed-by: Brian Paul <[email protected]>
* gallivm: fix up size queries for dx10 sviewinfo opcodeRoland Scheidegger2013-02-081-0/+2
| | | | | | | | | | | | | | | Need to calculate the number of mip levels (if it would be worthwile could store it in dynamic state). While here, the query code also used chan 2 for the lod value. This worked with mesa state tracker but it seems safer to use chan 0. Still passes piglit textureSize (with some handwaving), though the non-GL parts are (largely) untested. v2: clarify and expect the sviewinfo opcode to return ints, not floats, just like the OpenGL textureSize (dx10 supports dst modifiers with resinfo). Also simplify some code. Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: get rid of tgsi_sampler_control param in img_filterRoland Scheidegger2013-02-082-40/+37
| | | | | | | | None of the filters used it (why would they). Maybe that param was just there because some of the lines were considered to be too short... Reviewed-by: Dave Airlie <[email protected]>
* softpipe: fix using optimized filter functionRoland Scheidegger2013-02-081-0/+1
| | | | | | | | | | | This optimized filter (when using repeat wrap modes, linear min/mag/mip filters, pot textures) only applies to 2d textures, but nothing prevented it from being used for other textures (likely leading to very bogus sample results). Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: first steps of adding dual source blend supportRoland Scheidegger2013-02-084-27/+57
| | | | | | | | | | | This adds support of the additional blending factors to the blend function itself, and also enables testing of it in lp_test_blend (which passes). Still need to add the glue code of linking fs shader outputs to blend inputs in llvmpipe, and probably need to add special handling if destination doesn't include alpha (which lp_test_blend doesn't test). Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: refactoring of visibility counter handlingRoland Scheidegger2013-02-085-20/+56
| | | | | | | | | There can be other per-thread data than just vis_counter, so pass a struct around instead (some of our non-public code uses this already and this difference is a major cause of merge pain). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* nv30: Fix memory leak.Vinson Lee2013-02-071-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeonsi: Handle scaled and integer formats for samplers and vertex elements.Michel Dänzer2013-02-071-17/+46
| | | | | | | Also, add assertions to stress that render targets don't support scaled formats. 20 more little piglits.
* radeonsi: Don't advertise PIPE_FORMAT_L8A8_SRGB support.Michel Dänzer2013-02-071-2/+2
| | | | The hardware can't do it.
* radeonsi: Remove incorrect (and dead) assignment in tex_fetch_args().Michel Dänzer2013-02-071-2/+0
| | | | The proper return type is assigned at the end of the function.
* radeonsi: Use unique names for referring to texture sampling intrinsics.Michel Dänzer2013-02-071-3/+18
| | | | | | | | | | Append the overloaded vector type used for passing in the addressing parameters. Without this, LLVM uses the same function signature for all those types, which cannot work. Fixes problems e.g. with FlightGear and Red Eclipse.
* r300g: put textures with usage=staging in GTT and make them linearMarek Olšák2013-02-072-1/+6
|
* r600g: fix slice tile max for compressed texture and async dmaJerome Glisse2013-02-072-4/+8
| | | | | | | Was using the pixel size instead of the number of block for the slice tile max computation which resulted in dma writing at wrong address. Signed-off-by: Jerome Glisse <[email protected]>
* radeonsi: use new RGBX formatsMarek Olšák2013-02-071-0/+26
|
* r300g: fix blending and alpha-test with RGBX16F and enable MSAA for itMarek Olšák2013-02-076-14/+45
|
* r300g: use new RGBX formatsMarek Olšák2013-02-072-3/+22
|
* r600g: use new RGBX formatsMarek Olšák2013-02-072-0/+52
|
* llvmpipe: remove extraneous const qualifierBrian Paul2013-02-062-2/+2
|
* gallium/util: remove duplicated function util_format_is_rgb_no_alphaMarek Olšák2013-02-061-1/+1
| | | | | | It only checks if alpha is present, so it's the same as util_format_has_alpha. Reviewed-by: Brian Paul <[email protected]>
* r600g: report correct control flow depthMarek Olšák2013-02-061-2/+1
|
* r300g: try to use color varyings for texcoords if max texcoord limit is exceededMarek Olšák2013-02-066-5/+71
| | | | +35 piglits
* r300/compiler: copy-propagate saturate mode when possibleMarek Olšák2013-02-061-2/+19
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r300/compiler: add support for saturate output modifier in r500 vertex shadersMarek Olšák2013-02-062-10/+19
| | | | | | | The GLSL compiler can simplify clamp(v,0,1) to saturate. The state tracker doesn't use it yet, but it will. Reviewed-by: Tom Stellard <[email protected]>
* r300g: fix blending with RGBX formatsMarek Olšák2013-02-063-122/+202
| | | | Change DST_ALPHA to ONE.
* r300g: fix blending with blend color and RGBA formatsMarek Olšák2013-02-061-0/+11
| | | | NOTE: This is a candidate for the stable branches.
* svga: fix sRGB renderingBrian Paul2013-02-051-0/+11
| | | | | | | | | | | We weren't emitting the SVGA_RS_OUTPUTGAMMA state so sRGB rendering didn't work properly. Fixes piglit's framebuffer-srgb test. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* r600g/compute: Fix segfault caused by new shader disassemblerTom Stellard2013-02-052-2/+4
|
* radeonsi: default PA_SC_RASTER_CONFIG to 0Alex Deucher2013-02-041-1/+3
| | | | | | | | That should work in all cases. Signed-off-by: Alex Deucher <[email protected]> Note: this is a candidate for the 9.1 branch.
* radeonsi: add support for Oland chipsAlex Deucher2013-02-042-0/+4
| | | | | | Signed-off-by: Alex Deucher <[email protected]> Note: this is a candidate for the 9.1 branch
* gallium/drivers: handle PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED queryBrian Paul2013-02-048-0/+17
| | | | Initially, only softpipe/llvmpipe support SQRT.
* radeonsi: Remove spurious traces of R16G16B16 support.Michel Dänzer2013-02-041-3/+0
| | | | | | The hardware can't do it, and these were causing warnings in some piglit tests. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Enable texture arrays.Michel Dänzer2013-02-041-1/+1
| | | | | | 28/30 piglit tests pass. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Improve packing of texture address parameters.Michel Dänzer2013-02-041-30/+97
| | | | | | | In particular, the LOD bias and depth comparison values are packed before the 'normal' texture coordinates, and the array slice and LOD values are appended. NOTE: This is a candidate for the 9.1 branch.