aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* draw: implement pipeline statistics in the draw moduleZack Rusin2013-04-161-15/+20
| | | | | | | | | | | | | This is a basic implementation of the pipeline statistics in the draw module. The interface is similar to the stream output statistics and also requires that the callers explicitly enable it. Included is the implementation of the interface in llvmpipe and softpipe. Only softpipe enables the pipeline statistics capability though because llvmpipe is lacking gathering of the fragment shading and rasterization statistics. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: add const to a parameter of util_max_layerMarek Olšák2013-04-061-1/+1
|
* util: add ETC as compressed formatWladimir2013-04-051-0/+1
| | | | | | | Add UTIL_FORMAT_LAYOUT_ETC to util_format_is_compressed. It was missing. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: fix is_blit_generic_supported() stencil checkingBrian Paul2013-04-051-12/+14
| | | | | | | | | | | | | | | Don't check if there's sampler support for stencil if we're not going to actually blit/copy stencil values. Fixes the case where we mistakenly said we can't support a blit of depth values from S8Z24 to X8Z24. Also, rename the is_stencil variable to dst_has_stencil to improve readability. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* util: add debug_memory_check_block(), debug_memory_tag()Brian Paul2013-04-041-0/+55
| | | | | | | | | | The former just checks that the given block is valid by checking the header and footer. The later sets the memory block's tag. With extra debug code, we can use that for monitoring/checking particular allocations. Reviewed-by: José Fonseca <[email protected]>
* gallivm: use f16c hw support for float->half and half->float conversionRoland Scheidegger2013-04-042-0/+2
| | | | | | | | Should be way faster of course on cpus supporting this (includes AMD Bulldozer and Jaguar cores, Intel Ivy Bridge and up (except budget models)). Passes piglit fbo-blending-formats GL_ARB_texture_float -auto on Ivy Bridge. Reviewed-by: Brian Paul <[email protected]>
* util: add new util_resource_size() function in u_resource.[ch]Brian Paul2013-04-032-1/+98
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: move functions from u_resource.c to u_transfer.cBrian Paul2013-04-032-75/+74
| | | | | | | | | The functions are prototyped in u_transfer.h and are related to the other functions in u_transfer.c. The next patch will re-use the u_resource.c file for new code. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add interface for driver queries like performance counters, etc.Marek Olšák2013-03-261-1/+1
| | | | | | | The pipe query interface is reused. The list of available queries can be obtained using pipe_screen::get_driver_query_info. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: attempt to fix blitting multisample texture arraysMarek Olšák2013-03-112-2/+2
| | | | We don't have a test for this yet, but obviously the swizzle was wrong.
* gallium/util: dump instance_divisorMarek Olšák2013-03-111-2/+1
|
* gallium/util: Correct shift value for TSC feature detection.Maxence Le Doré2013-03-081-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* u_blitter: don't create illegal shaders for 1D/3D/RECT/CUBE MSAADave Airlie2013-03-041-0/+5
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/util: add helper code for 1D integer rangeMarek Olšák2013-03-011-0/+89
| | | | | | | | | | Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes based on Brian's review Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch. (the next patch depends on it)
* util: fix issues with util_clear_render_target.Roland Scheidegger2013-02-281-9/+46
| | | | | | | | For PIPE_BUFFER we need coord adjustments for the transfer. And for pure integer formats util_pack_color just crashes, need to handle that differently due to clear colors being ints/uints. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: add helper util_max_layer from r600gMarek Olšák2013-02-261-0/+16
|
* util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.José Fonseca2013-02-231-4/+22
| | | | | | | | | We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. Reviewed-by: Brian Paul <[email protected]>
* util/dump: Use static assertion to detect string table size mismatches.José Fonseca2013-02-231-1/+18
| | | | | | | | Suggested by Brian Paul. Could probably be extended to other enums. Reviewed-by: Brian Paul <[email protected]>
* util/u_dump: Update texture target strings.José Fonseca2013-02-221-2/+10
|
* util/debug: Always use __builtin_frame_address on gcc.Sergey Matyukevich2013-02-221-4/+1
| | | | | | Should workaround fdo bug 57563. Signed-off-by: José Fonseca <[email protected]>
* gallium: add red-alpha texture formats and a couple of util functionsMarek Olšák2013-02-132-0/+129
| | | | | | | | | 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]>
* 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]>
* gallium: add RGBX formats for existing GL RGB texture formatsMarek Olšák2013-02-072-0/+22
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/util: remove duplicated function util_format_is_rgb_no_alphaMarek Olšák2013-02-062-32/+5
| | | | | | It only checks if alpha is present, so it's the same as util_format_has_alpha. Reviewed-by: Brian Paul <[email protected]>
* gallium/u_upload_mgr: fix a serious memory leakMarek Olšák2013-01-281-2/+1
| | | | It can eat all memory and crash in a matter of minutes with r600g.
* util: add new error checking code in vbuf helperBrian Paul2013-01-251-27/+49
| | | | | | | | | | | Check the return value of calls to u_upload_alloc() and u_upload_data() and return early if needed. Since we don't have a way to propagate errors all the way up to Mesa through pipe_context::draw_vbo(), call debug_warn_once() so the user might have some clue about OOM errors. Note: This is a candidate for the 9.0 branch.
* util: add some defensive coding in u_upload_alloc()Brian Paul2013-01-251-1/+7
| | | | | | | | | | | | | | Some callers of this function were checking the 'ptr' result to see if the function failed. But the correct way is to check the regular return value for PIPE_ERROR_x. Now we initialize all the returned values at the top of the function in case we do hit an error (like OOM). Callers are more likely to detect OOM conditions now. But there are some callers which don't do any error checking... Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* util: silence MSVC signed/unsigned comparison warningsBrian Paul2013-01-251-4/+4
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC double->float conversion warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned warnings in debug_get_flags_option()Brian Paul2013-01-251-1/+1
| | | | Reviewed-by: José Fonseca <[email protected]>
* gallium/util: add a half float array to util_colorMarek Olšák2013-01-151-0/+1
| | | | For convenient packing into half floats.
* gallium/util: fix glClear with MRT by making the FS write to all cbufsMarek Olšák2013-01-152-5/+33
| | | | Reviewed-by: Brian Paul <[email protected]>
* util: add new primitive types to pipe_prim_names[] arrayBrian Paul2013-01-141-0/+4
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fix clearing integer color buffersRoland Scheidegger2013-01-101-0/+2
| | | | | | | | | | | | | We get int/uint clear color value in this case, and util_pack_color can't handle these formats at all (even if it could, float input color isn't what we want). Pass through the color union appropriately and handle the packing ourselves (as I couldn't think of a good generic util solution). This gets piglit fbo_integer_precision_clear and fbo_integer_readpixels_sint_uint from the ext_texture_integer test group from segfault to pass (which only leaves fbo-blending from that group not working). v2: fix up comments
* r300g: implement MSAAMarek Olšák2013-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | This is not as optimized as r600g - the MSAA compression is missing, so r300g needs a lot of bandwidth (more than r600g to do the same thing). However, if the bandwidth is not an issue for you, you can enjoy this unoptimized MSAA support. The only other missing optimization for MSAA is the fast color clear. MSAA is enabled on r500 only, because that's the only GPU family I tested. That said, MSAA should work on r300 and r400 as well (but you must set RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n, n >= 2, n <= 6) I will enable the support by default on r300-r400 once someone (other than me) tests those chipsets with piglit. The supported modes are 2x, 4x, 6x. The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only). Those 3 formats are used for all GL internal formats. Tested with piglit. (I have ported all MSAA tests to GL2.1)
* util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOATBrian Paul2013-01-041-1/+1
| | | | | | The Z32 pixel is 4 bytes so multiply x by 4, not 2. Note: This is a candidate for the stable branches.
* util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINTBrian Paul2013-01-041-0/+36
| | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58972 Note: This is a candidate for the stable branches.
* util: move var declaration before loop to fix MSVC errorBrian Paul2013-01-041-1/+2
|
* st/mesa: fix GetTexImage for compressed 2D array texturesMarek Olšák2013-01-041-0/+18
| | | | | | | This uses a 3D blit to decompress the texture and then a 3D transfer to read it. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: remove unused helper util_create_rgba_textureMarek Olšák2013-01-042-61/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: implement 3D blittingMarek Olšák2013-01-042-30/+83
| | | | | | Scaling and flipping in the Z direction isn't allowed yet. Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube indexMarek Olšák2013-01-041-0/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: minor simplificationMarek Olšák2013-01-041-10/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: unify some parameters into a dstbox parameter in blit_genericMarek Olšák2013-01-042-20/+25
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/u_blitter: remove useless parameter from blitter_default_dst_textureMarek Olšák2013-01-042-7/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/util: complete implementation of util_dump_transferMarek Olšák2013-01-041-4/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* util/u_format: Round when converting depth values from float to z16_unorm.José Fonseca2012-12-211-1/+1
| | | | | | This makes the z16_unorm -> float -> z16_unorm conversion lossless. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_blitter: Remove the overlapped blit assert from ↵Henri Verbeet2012-12-161-28/+0
| | | | | | | | | | | | util_blitter_blit_generic(). This is used by st_BlitFramebuffer() / r600_blit(), and ARB_fbo allows overlapped blits, even though the result is undefined. No piglit regressions on r600g / CYPRESS. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add a simple allocator for suballocating from a large bufferMarek Olšák2012-12-122-0/+180
| | | | | Tested-by: Aaron Watry <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium: remove pipe_surface::usageMarek Olšák2012-12-129-33/+13
| | | | | | Not really used by anybody now. Reviewed-by: Brian Paul <[email protected]>