summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless checks for NULL before freeingMatt Turner2012-09-056-33/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* Use the correct macro _WIN32 for Windows.Vinson Lee2012-09-052-3/+3
| | | | | | | | | | | | | | The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm,llvmpipe: Use 4-wide vectors on AMD Bulldozer.José Fonseca2012-09-043-1/+15
| | | | | | 8-wide vectors is slower. Reviewed-by: Roland Scheidegger <[email protected]>
* util: Add cpuid for Solaris Studio.Vinson Lee2012-09-031-2/+2
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util: remove u_debug.h from u_math.hBrian Paul2012-09-011-1/+0
| | | | No debug code is used in u_math.h
* util: include u_debug.hBrian Paul2012-09-011-0/+1
|
* tgsi: include u_debug.hBrian Paul2012-09-011-0/+1
|
* util: add casts to silence signed/unsigned comparison warningsBrian Paul2012-08-311-2/+2
|
* r600g: implement MSAA for CaymanMarek Olšák2012-08-312-1/+3
| | | | | Everything works except for blitting MSAA colorbuffers, which isn't so trivial on Cayman. It's a rarely-used feature anyway.
* r600g: implement draw_rectangle callbackMarek Olšák2012-08-302-14/+16
| | | | | | The color resolve on r6xx needs PT_RECTLIST. Using conventional primitive types (triangles and quads) produces an ugly line between two diagonally opposite corners. I guess a rectangular point sprite would work too.
* u_vbuf: avoid unnecessary update of the vertex elementsVadim Girlin2012-08-281-1/+3
| | | | | Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: implement tile code for PIPE_FORMAT_Z32_FLOATBrian Paul2012-08-271-0/+36
| | | | Reviewed-by: José Fonseca <[email protected]>
* r600g: implement compression for MSAA colorbuffers for evergreenMarek Olšák2012-08-272-0/+50
| | | | | | | | | | | | | | | | This adds the FMASK and CMASK buffers. They share the same resource with color data. COMPRESSION and FAST_CLEAR are always enabled if both FMASK and CMASK are allocated. We initialize the CMASK to a "compressed" state (not "fast cleared"), so that we can keep FAST_CLEAR enabled all the time. Both FMASK and CMASK must be present at the moment. If either one is missing, the other one is not used. v2: add cayman regs in the list Reviewed-by: Jerome Glisse <[email protected]>
* gallium/u_blitter: initialize sample mask in resolveMarek Olšák2012-08-271-0/+1
| | | | Reviewed-by: Jerome Glisse <[email protected]>
* draw: Fix regression in draw_set_sampler(_views).José Fonseca2012-08-241-6/+6
| | | | | | | | | | draw->samplers(_views) now has PIPE_SHADER_TYPES elements, instead of PIPE_MAX_SAMPLERS as before. Also, shader_stage must be less than PIPE_SHADER_TYPES to prevent buffer overflow. Trivial.
* util: update and fix u_upload_mgr.h commentsBrian Paul2012-08-181-4/+3
|
* gallium/draw: move misplaced braceBrian Paul2012-08-161-1/+1
|
* gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #defineBrian Paul2012-08-164-9/+7
| | | | | | | | | | | | PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
* draw: index samplers and sampler_view state by shader typeBrian Paul2012-08-163-29/+34
| | | | So that we can handle GS state and other types of shaders in the future.
* draw: move tgsi-related state into a tgsi sub-structBrian Paul2012-08-165-30/+35
| | | | To better organize things a bit.
* gallium: add a shader stage/type param to some draw functionsBrian Paul2012-08-162-19/+31
| | | | | To prepare for geometry shader texture support in the draw module. Note: we still only handle the vertex shader case.
* gallium/u_blitter: document custom meta helpersMarek Olšák2012-08-152-7/+16
|
* r600g: implement MSAA color resolveMarek Olšák2012-08-152-0/+69
|
* r600g: implement MSAA depth-stencil decompression and resolveMarek Olšák2012-08-152-0/+3
| | | | and integer textures, which are resolved the same as depth, I think.
* gallium/u_blitter: implement X and Y texture flippingMarek Olšák2012-08-151-11/+26
|
* gallium/u_blitter: implement blitting multisample resourcesMarek Olšák2012-08-156-99/+342
| | | | It can blit only one sample at a time (it should be called in a loop).
* gallium: add TGSI support for multisample texturesMarek Olšák2012-08-153-1/+6
| | | | | | | | | | The only allowed instructions are TXQ_LZ and TXF. TXQ_LZ is like TXQ, but without the LOD parameter (which is always zero with MSAA textures) The 3rd or the 4th texcoord component in TXF should contain the sample index for a 2D_MSAA or 2D_ARRAY_MSAA texture, respectively.
* gallium/tgsi: fix TGSI text parserMarek Olšák2012-08-151-77/+97
| | | | | | | | The problem was that the string matching succeeded e.g. for "2D" when there was actually "2D_MSAA" and then failed parsing "_MSAA". To prevent similar failures in the future, let's fix this kind of error everywhere.
* gallium/u_blit: set dst format from pipe_resource, not pipe_surfaceMarek Olšák2012-08-151-1/+1
| | | | | | We use it to decide whether we can use resource_copy_region. NOTE: This is a candidate for the 8.0 branch.
* cso: rearrange some structure fields for consistencyBrian Paul2012-08-101-2/+3
|
* gallivm: fix crash in lp_sampler_static_state()Brian Paul2012-08-101-4/+3
| | | | | | | | | | | | Fixes WebGL conformance/uniforms/uniform-default-values.html crash. We need to check for the null view pointer before accessing view->texture. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53317 Note: This is a candidate for the 8.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: remove unused src_elem_type variableBrian Paul2012-08-081-2/+1
| | | | Reviewed-by: José Fonseca <[email protected]>
* translate: Fix typo in is_legal_int_format_combo.Vinson Lee2012-08-071-1/+1
| | | | | | | Fixes same on both sides defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallivm: Add constructor for raw_debug_ostream.Vinson Lee2012-08-061-0/+4
| | | | | | | Fixes uninitialized scalar field defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* util: Move dereference after null check in util_resource_copy_region.Vinson Lee2012-08-041-3/+3
| | | | | | | Fixes dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: add a query for checking whether copying is supportedMarek Olšák2012-08-042-32/+68
| | | | v2: add comments
* gallium/u_blitter: remove fallback for stencil copy that all drivers skippedMarek Olšák2012-08-042-13/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: add ability to blit only depth or only stencilMarek Olšák2012-08-042-13/+16
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: minor cleanupMarek Olšák2012-08-042-8/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/tgsi: fixup texture name stringsMarek Olšák2012-08-041-4/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: set sample mask to ~0Marek Olšák2012-08-042-0/+20
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blit: bail out if src is a multisample textureMarek Olšák2012-08-041-0/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blit: check nr_samples before using resource_copy_regionMarek Olšák2012-08-041-1/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: set sample mask to ~0 for clear, blit and gen_mipmapMarek Olšák2012-08-044-1/+23
| | | | | | | The sample mask affects single-sampled rendering too (it's orthogonal to the color mask). Reviewed-by: Brian Paul <[email protected]>
* draw: Ensure channel in convert_to_soa is initialized.Vinson Lee2012-08-031-1/+1
| | | | | | | Fixes uninitialized pointer read defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* u_blitter: Move a pointer dereference after null check.Vinson Lee2012-08-031-2/+3
| | | | | | | Fixes dereference before null check defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Use C99 NAN and INFINITY macrosMatt Turner2012-08-031-10/+3
|
* cso: remove unreachable break statementsBrian Paul2012-08-031-5/+0
|
* cso: 80-column wrapping, remove trailing whitespace, etcBrian Paul2012-08-031-33/+54
|
* gallium: consolidate CSO sampler and sampler_view functionsBrian Paul2012-08-037-254/+150
| | | | | | | | | | | | | Merge the vertex/fragment versions of the cso_set/save/restore_samplers() functions. Now we pass the shader stage (PIPE_SHADER_x) to the function to indicate vertex/fragment/geometry samplers. For example: cso_single_sampler(cso, PIPE_SHADER_FRAGMENT, unit, sampler); This results in quite a bit of code reduction, fewer CSO functions and support for geometry shaders. Reviewed-by: Marek Olšák <[email protected]>