summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* gallium: add red-alpha texture formats and a couple of util functionsMarek Olšák2013-02-133-0/+141
| | | | | | | | | This is for glGetTexImage and it will be used for samplers only (which some drivers already implement by reading util_format_description). v2: incorporate Brian's suggestion Reviewed-by: Brian Paul <[email protected]>
* 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]>
* gallium/docs: fix typos in sample opcode descriptionsRoland Scheidegger2013-02-121-2/+3
|
* 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]>
* gallium: fix tgsi SAMPLE_L opcode to use separate source for explicit lodRoland Scheidegger2013-02-127-20/+10
| | | | | | | | | | | | | | | | | | | | | It looks like using coord.w as explicit lod value is a mistake, most likely because some dx10 docs had it specified that way. Seems this was changed though: http://msdn.microsoft.com/en-us/library/windows/desktop/hh447229%28v=vs.85%29.aspx - let's just hope it doesn't depend on runtime build version or something. Not only would this need translation (so go against the stated goal these opcodes should be close to dx10 semantics) but it would prevent usage of this opcode with cube arrays, which is apparently possible: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509699%28v=vs.85%29.aspx (Note not only does this show cube arrays using explicit lod, but also the confusion with this opcode: it lists an explicit lod parameter value, but then states last component of location is used as lod). (For "true" hw drivers, only nv50 had code to handle it, and it appears the code was already right for the new semantics, though fix up the seemingly wrong c/d arguments while there.) v2: fix comment, separate out other changes. Reviewed-by: Jose Fonseca <[email protected]>
* util: fix incorrect Z bit masking in util_clear_depth_stencil()Brian Paul2013-02-121-2/+2
| | | | | | | | | | | | | For PIPE_FORMAT_Z24_UNORM_S8_UINT, the Z bits are in the 24 least significant bits. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=60527 and http://bugs.freedesktop.org/show_bug.cgi?id=60524 and http://bugs.freedesktop.org/show_bug.cgi?id=60047 Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[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]>
* winsys/radeon: fix bo with virtual address referencing mismatchMartin Andersson2013-02-111-0/+4
| | | | | | | | | | | | | | If the same context try to flink and open the object, use the same bo struct instead of opening a new gem handle for the object. This way we avoid avoid having 2 different handle pointing to the same kernel object which can latter lead to trouble with virtual address. Fix: https://bugs.freedesktop.org/show_bug.cgi?id=60200 Signed-off-by: Martin Andersson <[email protected]> Reviewed-by: Jerome Glisse <[email protected]>
* llvmpipe: fix vertex_header mask store in big-endianAdhemerval Zanella2013-02-111-0/+48
| | | | | | | This patch fixes the vertex_header mask bitfield store in big-endian architectures by bit-swap the fields accordingly. Reviewed-by: Adam Jackson <[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-084-124/+143
| | | | | | | | | | | | | | | 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]>
* softpipe: try to beat new dx10-style sample opcodes into shapeRoland Scheidegger2013-02-081-67/+89
| | | | | | | | | | | | | | | | | | | | | | There were several bugs how this was handled, most opcodes wouldn't even have fetched the right arguments. Also, the tex "target" is coming from the sampler view, hence it cannot have information about shadow comparisons - fortunately this is not only sampler state but also needs to have matching instruction, so just use this instead to identify shadow comparisons. Still untested (compiles...). Note that sample_i and sviewinfo are still busted (just assert). (The problem is that the interface for doing the opengl-equivalent functions txf and txq is tied to the specific the sampler itself but these opcodes have no sampler associated with them. Oops...) Also, even the other sample instructions will not work correctly since they always operate on samplers which include the texture state. Fixing this wouldn't be that difficult but most likely make softpipe quite a bit slower when using the OpenGL tex opcodes (as the samplers have pre-baked function calls in the sampler state depending on texture state and that stuff would need to be evaluated at runtime), so leave it for now. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix up size queries for dx10 sviewinfo opcodeRoland Scheidegger2013-02-088-75/+67
| | | | | | | | | | | | | | | 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]>
* gallivm: hook up dx10 sampling opcodesRoland Scheidegger2013-02-083-6/+419
| | | | | | | | | They are similar to old-style tex opcodes but with separate sampler and texture units (and other arguments in different places). Also adjust the debug tgsi dump code. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* winsys/radeon: improve debuging printingJerome Glisse2013-02-081-1/+2
| | | | | | | Make sure one can identify virtual address failure from allocation failure. Signed-off-by: Jerome Glisse <[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]>
* gallivm: fix typo in lp_build_mul_normRoland Scheidegger2013-02-081-1/+1
| | | | | | | | The signed case didn't do what the comment indicated. Should increase rounding precision (at the expense of performance since the former code was effectively a no-op). 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]>
* xorg: fix exa finish accessJerome Glisse2013-02-081-1/+1
| | | | | | | | The exa core will already set the pointer to NULL prior calling the callback function. So don't bail out in the callback if it's already NULL. Signed-off-by: Jerome Glisse <[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
|
* gallium: add RGBX formats for existing GL RGB texture formatsMarek Olšák2013-02-073-0/+36
| | | | Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: remove extraneous const qualifierBrian Paul2013-02-062-2/+2
|
* gallium/util: remove duplicated function util_format_is_rgb_no_alphaMarek Olšák2013-02-063-33/+6
| | | | | | 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]>