aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* main/syncobj: return GL_INVALID_VALUE for invalid sync objectsJordan Justen2012-12-061-4/+4
| | | | | | | | Note: The GL/GLES3 web man pages don't seem to properly document glWaitSync's error when the sync object is invalid. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add set support (stores a set of pointers)Eric Anholt2012-12-064-0/+444
| | | | | | | | | From: git://people.freedesktop.org/~anholt/hash_table Reviewed-by: Jordan Justen <[email protected]> [[email protected]: minor rework for mesa] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Fix statement before declaration.José Fonseca2012-12-061-1/+2
|
* util: Add util_copy_box helper.José Fonseca2012-12-063-29/+64
| | | | | | Must users of util_copy_rect() need or should deal with volumes. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: Move the util_copy/fill_rect into u_surface.José Fonseca2012-12-065-187/+140
| | | | | | | | | | u_rect.h said these should move to a different file, and u_surface seems a better home. Leave #include "util/u_surface.h" to avoid having to touch thousand of files. Reviewed-by: Brian Paul <[email protected]>
* gallium/os: Cleanup up os_time_get/os_time_get_nano.José Fonseca2012-12-062-21/+19
| | | | | | | | - Re-implement os_time_get in terms of os_time_get_nano() for consistency - Use CLOCK_MONOTONIC as recommended - Only use clock_gettime on Linux for now. Reviewed-by: Brian Paul <[email protected]>
* gallium/os: Fix os_time_sleep() on Windows for small durations.José Fonseca2012-12-061-1/+5
| | | | | | Prevents undetermined sleeps. Reviewed-by: Brian Paul <[email protected]>
* meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADERStefan Dösinger2012-12-061-0/+11
| | | | | | | | | Fixes clears in Wine on r200. NOTE: This is a candidate for stable release branches. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* radeon: Initialize swrast before setting limitsStefan Dösinger2012-12-061-9/+9
| | | | | | NOTE: This is a candidate for stable release branches. Signed-off-by: Alex Deucher <[email protected]>
* r200: Initialize swrast before setting limitsStefan Dösinger2012-12-061-10/+9
| | | | | | | | | Otherwise the driver announces 4096 vertex shader constants and other way too high limits. NOTE: This is a candidate for stable release branches. Signed-off-by: Alex Deucher <[email protected]>
* gallivm: Fix lerping of (un)signed normalized numbers.José Fonseca2012-12-061-49/+43
| | | | | | | | | | | | | | | | | | Several issues actually: - Fix a regression in unsigned normalized in the rescaling [0, 255] to [0, 256] - Ensure we use signed shifts where appropriate (instead of unsigned shifts) - Refactor the code slightly -- move all the logic inside lp_build_lerp_simple(). This change, plus an adjustment in the tolerance of signed normalized results in piglit fbo-blending-formats fixes bug 57903 Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fix lp_build_print_value of smaller integer types.José Fonseca2012-12-061-1/+12
| | | | | | | They need to be converted to the native integer type to prevent garbage in higher order bits from being printed. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: remove unused variableBrian Paul2012-12-061-1/+0
|
* draw: remove some dead constant buffer codeBrian Paul2012-12-064-82/+0
| | | | | | | | | Remove the draw_vs_set_constants() and draw_gs_set_constants() functions and the draw->vs.aligned_constants, draw->vs.aligned_constant_storage and draw->vs.const_storage_size fields. None of it was used. Reviewed-by: José Fonseca <[email protected]>
* android: Fix build of libmesa_programChad Versace2012-12-051-0/+3
| | | | | | | | | | | | | | | | | Commit 4097308 fixed the build in a questionable way. It worked at the time, but, as Ian pointed out, the fix would likely fail at a future commit due to the indeterminism of parallel builds. And that's exactly what happened; the fix no longer works. `mm -j4` on Fedora 17 fails for me. The problem is that there is no rule for program_parse.tab.h. To fix that, this patch adds a rule that makes program_parse.tab.c depend on program_parse.tab.h. Technically, the c file does not depend on the h file. However, because the two files are generated together by a single invocation of Bison, any rule that forces execution of Bison is sufficient. Signed-off-by: Chad Versace <[email protected]>
* llvmpipe: EXT_transform_feedback support (v1.1)Dave Airlie2012-12-0615-101/+125
| | | | | | | | | | | | I'd written most of this ages ago, but never finished it off. This passes 115/130 piglit tests so far. I'll look into the others as time permits. v1.1: fix calloc return check as suggested by Jose. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965: Add a debug flag for counting cycles spent in each compiled shader.Eric Anholt2012-12-0517-9/+524
| | | | | | | | | | | | | | | | | | | | | | This can be used for two purposes: Using hand-coded shaders to determine per-instruction timings, or figuring out which shader to optimize in a whole application. Note that this doesn't cover the instructions that set up the message to the URB/FB write -- we'd need to convert the MRF usage in these instructions to GRFs so that our offsets/times don't overwrite our shader outputs. Reviewed-by: Kenneth Graunke <[email protected]> (v1) v2: Check the timestamp reset flag in the VS, which is apparently getting set fairly regularly in the range we watch, resulting in negative numbers getting added to our 32-bit counter, and thus large values added to our uint64_t. v3: Rebase on reladdr changes, removing a new safety check that proved impossible to satisfy. Add a comment to the AOP defs from Ken's review, and put them in a slightly more sensible spot. v4: Check timestamp reset in the FS as well.
* i965: Add a flag for instructions with normal writemasking disabled.Eric Anholt2012-12-054-0/+4
| | | | | For getting values from the new timestamp register, the channels we load have nothing to do with the pixels dispatched.
* r600g: use default action for min/max opcode in tgsi to llvmVincent Lejeune2012-12-051-4/+0
| | | | Reveiwed-by: Tom Stellard <thomas.stellard at amd.com>
* gallivm: Have a default emit function for min/max opcodeVincent Lejeune2012-12-051-0/+29
| | | | Reveiwed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g: use default action for fdiv/rcp opcodeVincent Lejeune2012-12-051-6/+1
| | | | Reveiwed-by: Tom Stellard <thomas.stellard at amd.com>
* gallivm: have a default emit function for fdiv/rcpVincent Lejeune2012-12-051-0/+25
| | | | Reveiwed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g: Use default mul/mad function for tgsi-to-llvmVincent Lejeune2012-12-051-8/+4
| | | | Reveiwed-by: Tom Stellard <thomas.stellard at amd.com>
* glsl: add new variable declaration in function body in lower_output_readVincent Lejeune2012-12-051-0/+1
| | | | Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
* draw: set precalc_flat flag for AA lines tooBrian Paul2012-12-051-0/+1
| | | | | | | | | Fixes flat shading for AA lines. demos/src/trivial/line-smooth is a test case which hits this. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: expose ARB_texture_cube_map_array in core contexts as wellChris Forbes2012-12-051-1/+1
| | | | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* scons: Require drm to build gallium/state_trackers/egl/x11/x11_screen.c.Vinson Lee2012-12-041-2/+4
| | | | | | | | | | | | x11_screen.c includes xf86drm.h, which comes from libdrm-dev. This patch fixes this build error. Compiling src/gallium/state_trackers/egl/x11/x11_screen.c ... src/gallium/state_trackers/egl/x11/x11_screen.c:30:21: fatal error: xf86drm.h: No such file or directory Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* i965/fs: Add support for uniform array access with a variable index.Eric Anholt2012-12-044-24/+216
| | | | | | | | | | | | | Serious Sam 3 had a shader hitting this path, but it's used rarely so it didn't show a significant performance difference (n=7). It does reduce compile time massively, though -- one shader goes from 14s compile time and 11723 instructions generated to .44s and 499 instructions. Note that some shaders lose 16-wide mode because we don't support 16-wide and pull constants at the moment (generally, things looping over a few-element array where the loop isn't getting unrolled). Given that those shaders are being generated with 15-20% fewer instructions, it probably outweighs the loss of 16-wide.
* i965/fs: Conditionalize constant-index UBO load code and add comments.Eric Anholt2012-12-041-28/+33
| | | | | I wanted to separate this step for easier reviewing when I add the variable-index case next.
* i965/fs: Restrict optimization that would fail for gen7's SENDs from GRFsEric Anholt2012-12-043-8/+28
| | | | | | v2: Fix SNB math bug in register_coalesce() where I was looking at the instruction to be removed, not the instruction to be copy propagated into.
* i965/fs: Allow source mods on gen7+ math.Eric Anholt2012-12-041-1/+1
| | | | | This gen6 restriction was removed in gen7 as the mathbox merge to act more like a normal instruction was finished in the hardware.
* i965/fs: Add instruction emit for varying-index reads of uniforms.Eric Anholt2012-12-044-0/+105
| | | | | | | The gen7 send-from-GRF path is sufficiently different from the perspective of IR generation and optimization that I just made it a separate opcode. v2: fix whitespace, rebase on Ken's recent refactor.
* i965/fs: Rename the existing pull constant load opcode.Eric Anholt2012-12-046-14/+16
| | | | | We're going to use another send message for handling loads with a varying per-fragment array index.
* i965: Add a header_present flag for setting up dp read messages.Eric Anholt2012-12-043-1/+7
| | | | | | As of gen7, we can skip the header on some messages, and this can make optimization on those messages much nicer when you've got GRFs instead of MRFs as the source.
* i965/gen7: Add some safety checks for send messages from GRFs.Eric Anholt2012-12-041-0/+15
|
* gallivm: Re-add the kludge for lp_build_lerp of fixed point types.José Fonseca2012-12-041-1/+5
| | | | | | | I removed it in commit 7d44d354bdba853e453ce3991396e2b0933468f4 but texture sample code still relies on it. Not sure how to this cleanly, so put it pack for now.
* util/u_debug: Cleanup/fix debug_dump_image.José Fonseca2012-12-042-33/+27
| | | | | | | - Handle other formats. - Prevent CRLF on Windows. Reviewed-by: Brian Paul <[email protected]>
* translate: Fix the fetch function assertions.José Fonseca2012-12-041-1/+3
| | | | | | fetch_rgba_float is NULL for integer formats, and vice-versa. Reviewed-by: Brian Paul <[email protected]>
* util/u_draw: Skip rendering instead of aborting when excessive number of ↵José Fonseca2012-12-041-2/+9
| | | | | | | | | | | | instances is found. This is a temporary hack. I believe the only way of properly fixing this is to check buffer overflow just before fetching based on addresses, instead of number of vertices/instances. This change simply allows tests that stress buffer overflows to complete without asserting, and should not affect valid rendering. Reviewed-by: Brian Paul <[email protected]>
* draw: Properly limit vertex buffer fetches on draw arrays.José Fonseca2012-12-041-1/+1
| | | | | | | | | | | We need to clamp vertex buffer fetch based on its size, not based on the user specified max index hint. This matches draw_pt_fetch_run() above. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* draw: Use symbolic primitive names in debug output.José Fonseca2012-12-041-3/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* draw: Consider the geometry shader when choosing the vertex size.José Fonseca2012-12-041-3/+6
| | | | | | | A single vertex size is chosen for the whole pipeline. So the number of geometry shader outputs must also be taken in consideration. Reviewed-by: Brian Paul <[email protected]>
* tgsi: Allow TXF from buffers.José Fonseca2012-12-041-0/+1
| | | | | | | There is more work necessary to properly support buffers in shaders, but this gets things a bit further along. Reviewed-by: Brian Paul <[email protected]>
* util/surface: Always use the surface format when clearing.José Fonseca2012-12-041-7/+8
| | | | | | Not the texture format, as they might differ. Reviewed-by: Brian Paul <[email protected]>
* tgsi: Increase maximum number of temps to 4096.José Fonseca2012-12-041-1/+1
| | | | | | | To match Shader Model 4 limits, as specified in http://msdn.microsoft.com/en-us/library/windows/desktop/ff471378.aspx Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Fix alignment.José Fonseca2012-12-041-0/+5
| | | | | | | | | My understanding and actual implementation of how the pixels are being fetch differed. This fixes bug 57863. Trivial.
* gallivm: Generalize lp_build_mul and lp_build_lerp for signed normalized types.José Fonseca2012-12-041-92/+82
| | | | | | | | This fixes fdo bug 57755 and most of the failures of piglit fbo-blending-formats GL_EXT_texture_snorm. GL_INTENSITY_SNORM is still failing, but problem is probably elsewhere, as GL_R8_SNORM works fine.
* automake/gallium: attempt to fix -lrtDave Airlie2012-12-041-1/+1
| | | | | | | | | fix non-automake bits in pipe-load to. Should fix: http://bugs.freedesktop.org/57852 Signed-off-by: Dave Airlie <[email protected]>
* u_cache: fix dereference before NULL checkDave Airlie2012-12-041-4/+4
|
* intel: Always enable GL_ARB_framebuffer_objectIan Romanick2012-12-031-2/+1
| | | | | | | | | | | | | | | Now that _mesa_BindFramebuffer does the right thing in ES contexts when the gl_extensions::ARB_framebuffer_object bit is set, the Intel driver doesn't need this hack. No piglit or GLES2 conformance regressions observed on IVB, and this patch (and the previous) fix es3conform's framebuffer_srgb_draw and transform_feedback_misc tests. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>