summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: #define fprintf to be __mingw_fprintf() on Mingw32Brian Paul2012-06-221-0/+10
| | | | | | So that formats such as "%llx" are understood. Reviewed-by: Kenneth Graunke <[email protected]>
* svga: init pointer to NULL to silence MSVC warningBrian Paul2012-06-221-1/+1
|
* clover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIRTom Stellard2012-06-221-1/+1
| | | | | | | | | | | | | | $CLANG_RESOURCE_DIR is the directory that contains all resources needed by clang to compile programs. When clover uses clang to compile kernels it needs to specify a resource dir, so that clang can find its internal headers (e.g. stddef.h). clang defines $CLANG_RESOURCE_DIR as $CLANG_LIBDIR/clang/$CLANG_VERSION This patch adds the --with-clang-libdir option in order to accommodate clang intalls to non-standard locations, and it also adds a check to the configure script to verify that $CLANG_RESOURCE_DIR/include contains the necessary header files.
* i965: Compute dFdy() correctly for FBOs.Paul Berry2012-06-226-9/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i965, dFdx() and dFdy() are computed by taking advantage of the fact that each consecutive set of 4 pixels dispatched to the fragment shader always constitutes a contiguous 2x2 block of pixels in a fixed arrangement known as a "sub-span". So we calculate dFdx() by taking the difference between the values computed for the left and right halves of the sub-span, and we calculate dFdy() by taking the difference between the values computed for the top and bottom halves of the sub-span. However, there's a subtlety when FBOs are in use: since FBOs use a coordinate system where the origin is at the upper left, and window system framebuffers use a coordinate system where the origin is at the lower left, the computation of dFdy() needs to be negated for FBOs. This patch modifies the fragment shader back-ends to negate the value of dFdy() when an FBO is in use. It also modifies the code that populates the program key (brw_wm_populate_key() and brw_fs_precompile()) so that they always record in the program key whether we are rendering to an FBO or to a window system framebuffer; this ensures that the fragment shader will get recompiled when switching between FBO and non-FBO use. This will result in unnecessary recompiles of fragment shaders that don't use dFdy(). To fix that, we will need to adapt the GLSL and NV_fragment_program front-ends to record whether or not a given shader uses dFdy(). I plan to implement this in a future patch series; I've left FIXME comments in the code as a reminder. Fixes Piglit test "fbo-deriv". NOTE: This is a candidate for stable release branches. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: minor transform feedback commentsBrian Paul2012-06-221-0/+2
|
* mesa: fix comments on UBO buffer binding functionsBrian Paul2012-06-221-4/+7
| | | | The old comments were for transform feedback.
* draw: Handle the case when there isn't a fragment shader.Olivier Galibert2012-06-221-10/+17
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* r600g: Unify SURFACE_SYNC packet emission for 3D and computeTom Stellard2012-06-213-101/+30
| | | | | | Drop the compute specific evergreen_set_buffer_sync() function and instead use the r600_surface_sync_command atom for emitting SURFACE_SYNC packets.
* r600g: Enable reusing of compute stateTom Stellard2012-06-211-6/+9
|
* r600g: Fix reading vtx instruction offset from bytestreamTom Stellard2012-06-211-1/+1
|
* radeon/llvm: Turn on the BitExtract peephole optimizationTom Stellard2012-06-212-5/+32
| | | | | Thie BitExtract optimization folds a mask and shift operation together into a single instruction (BFE_UINT).
* radeon/llvm: Lower ROTL to BIT_ALIGNTom Stellard2012-06-216-1/+54
|
* radeon/llvm: Use the VLIW Scheduler for R600->NITom Stellard2012-06-2112-8/+75
| | | | | | | | | | | | | | | | | | | It's not optimal, but it's better than the register pressure scheduler that was previously being used. The VLIW scheduler currently ignores all the complicated instruction groups restrictions and just tries to fill the instruction groups with as many instructions as possible. Though, it does know enough not to put two trans only instructions in the same group. We are able to ignore the instruction group restrictions in the LLVM backend, because the finalizer in r600_asm.c will fix any illegal instruction groups the backend generates. Enabling the VLIW scheduler improved the run time for a sha1 compute shader by about 50%. I'm not sure what the impact will be for graphics shaders. I tested Lightsmark with the VLIW scheduler enabled and the framerate was about the same, but it might help apps that use really big shaders.
* mesa: set GL_ARB_uniform_buffer_object extension year to 2009Brian Paul2012-06-211-1/+1
|
* mesa: Add a comment explaining my thoughts on glBindBufferBase().Eric Anholt2012-06-211-0/+26
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.Eric Anholt2012-06-211-0/+24
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getintegeri_v. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for glBindBufferBase/Range on GL_UNIFORM_BUFFER.Eric Anholt2012-06-211-0/+85
| | | | | | | | | | | | Fixes piglits: GL_ARB_uniform_buffer_object/bindbuffer-general-point. GL_ARB_uniform_buffer_object/negative-bindbuffer-buffer GL_ARB_uniform_buffer_object/negative-bindbuffer-index GL_ARB_uniform_buffer_object/negative-bindbuffer-target GL_ARB_uniform_buffer_object/negative-bindbufferrange-range Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move glBindBufferBase and glBindBufferRange() to bufferobj.Eric Anholt2012-06-214-59/+103
| | | | | | | | | | | The rest of the TFB implementation remains in transformfeedback.c, and this will be shared with UBOs. v2: Move the size/offset checks shared with UBOs to common code as well. (Kenneth's review) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move buffer object dispatch setup to bufferobj.c.Eric Anholt2012-06-213-11/+21
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add indexed binding points for uniform buffer objects.Eric Anholt2012-06-212-0/+51
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for the GL_UNIFORM_BUFFER general binding point.Eric Anholt2012-06-213-0/+22
| | | | | | | Fixes piglit ARB_uniform_buffer_object/buffer-targets. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.Eric Anholt2012-06-213-0/+51
| | | | | | | Fixes piglit GL_ARB_uniform_buffer_object/minmax. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: Add uniform buffer object APIVincent Lejeune2012-06-213-1/+101
| | | | | | | | | v2: Fix a typo spotted by Eric Anholt. v3: Fix missing "GL" on types, fix style, fix Studly_Caps extension name, drop commented code duplicated with GL3x.xml [anholt] Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dricore: Turn it into a normal library.Eric Anholt2012-06-211-9/+9
| | | | | | | | | | | | Our intention is still that it's not abi stable, so make the package version number get included in the library name. Now you can parallel install dricore-using drivers from multiple mesa versions. We can put it into lib now that we're following library versioning rules (assuming that ABIs don't change within a single Mesa point release). LD_LIBRARY_PATH still doesn't work with a non-/, non-/usr prefix because libtool uses rpath instead of runpath for nonstandard prefixes.
* automake: Convert Mesa built sources generation to automake.Eric Anholt2012-06-212-61/+65
|
* mesa: Move GL header installation to automake.Eric Anholt2012-06-212-12/+4
| | | | | This cuts some cruft related to osmesa where we were being careful to not install headers twice.
* automake: Move mesa subdirs processing to automake.Eric Anholt2012-06-212-45/+4
|
* automake: Move .pc installation to automake.Eric Anholt2012-06-212-10/+10
|
* automake: Move the master Mesa makefile to Makefile.old.Eric Anholt2012-06-213-9/+34
| | | | | This will let me incrementally move stuff to automake without converting libmesa.a all at once.
* automake: Convert osmesa.pc to be generated by configure.Eric Anholt2012-06-212-21/+5
|
* mesa: Convert gl.pc to be generated by configure.Eric Anholt2012-06-212-18/+6
| | | | This saves a step of mashing variables around in our Makefile.
* automake: Convert src/mesa/drivers/x11/Makefile to automake.Eric Anholt2012-06-214-86/+76
| | | | | | | | | The weird versioning of the libGL where the package version was sort of expressed as a big integer is dropped. libtool didn't like the 0 prefix, and it didn't really make sense anyway -- if you interpret it as an integer version number, old Mesa 071200 was bigger than current Mesa 08100. Instead, just bump the minor version and drop the patchlevel.
* automake: Convert src/gallium/Makefile to automake.Eric Anholt2012-06-213-12/+23
|
* automake: Convert src/mapi/glapi/gen to silent build.Eric Anholt2012-06-211-24/+26
|
* automake: Convert src/mapi/glapi/gen/Makefile to automake.Eric Anholt2012-06-212-6/+3
|
* automake: Convert src/mesa/drivers/Makefile to automake.Eric Anholt2012-06-213-29/+23
|
* automake: Convert gen_matypes building to automake.Eric Anholt2012-06-217-75/+84
|
* make: Drop HOST_CC and HOST_CFLAGS.Eric Anholt2012-06-211-1/+1
| | | | | | Except for the deleted linux-cell target, these were just the target cc/cflags. The only usage was for gen_matypes, which wants the target's structure packing, not the host, anyway.
* make: Fold ASM_CFLAGS into DEFINES.Eric Anholt2012-06-2112-15/+5
| | | | | | Every place that uses ASM_FLAGS already uses DEFINES. Not including it in DEFINES is just a way to screw up potential users, as I've done several times while working on the build system.
* automake: Convert src/egl/Makefile to automake.Eric Anholt2012-06-213-36/+29
|
* nv50: fix buffer reuse issuesMarcin Slusarz2012-06-202-0/+18
| | | | | | | | | | 1) We need to insert a barrier between consecutive transform feedback calls. 2) VBO cache needs to be flushed when TFB output is used as VBO draw input. Fixes Piglit test EXT_transform_feedback/immediate-reuse. Thanks to Christoph Bumiller for pointing out bugs in previous versions of this patch.
* st/mesa: fix transform feedback of unsubscripted gl_ClipDistance arrayMarcin Slusarz2012-06-202-44/+6
| | | | | | | | | | | | | | | | | | | | | | | | | gl_ClipDistance needs special treatment in form of lowering pass which transforms gl_ClipDistance representation from float[] to vec4[]. There are 2 implementations - at glsl linker level (enabled by LowerClipDistance option) and at glsl_to_tgsi level (enabled unconditionally for gallium drivers). Second implementation is incomplete - it does not take into account transform feedback (see commit 642e5b413e0890b2070ba78fde42db381eaf02e5 "mesa: Fix transform feedback of unsubscripted gl_ClipDistance array" for details). There are 2 possible fixes: - adding transform feedback support into glsl_to_tgsi version - ripping gl_ClipDistance support from glsl_to_tgsi and enabling gl_ClipDistance lowering on glsl linker side This patch implements 2nd option. All it does is: - reverts most of the commit 59be691638200797583bce39a83f641d30d97492 "st/mesa: add support for gl_ClipDistance" - changes LowerClipDistance to true Fixes Piglit tests "EXT_transform_feedback/builtin-varyings gl_ClipDistance[{2,3,4,5,6,7,8}]-no-subscript" at least on nv50 and evergreen cards.
* glx/tests: Fix signed/unsigned comparison warnings.Paul Berry2012-06-203-28/+28
|
* i965/msaa: Only do multisample rasterization if GL_MULTISAMPLE enabled.Paul Berry2012-06-204-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | From the GL 3.0 spec (p.116): "Multisample rasterization is enabled or disabled by calling Enable or Disable with the symbolic constant MULTISAMPLE." Elsewhere in the spec, where multisample rasterization is described (sections 3.4.3, 3.5.4, and 3.6.6), the following text is consistently used: "If MULTISAMPLE is enabled, and the value of SAMPLE_BUFFERS is one, then..." So, in other words, disabling GL_MULTISAMPLE should prevent multisample rasterization from occurring, even if the draw framebuffer is multisampled. This patch implements that behaviour by setting the WM and SF stage's "multisample rasterization mode" to MSRAST_ON_PATTERN only when the draw framebuffer is multisampled *and* GL_MULTISAMPLE is enabled. Fixes piglit test spec/EXT_framebuffer_multisample/enable-flag. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/msaa: Disable unsupported formats.Paul Berry2012-06-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | Due to hardware limitations, MSAA is unsupported on Gen6 for formats containing >64 bits of data per pixel. From the Sandy Bridge PRM, vol4 part1, p72 ("Surface Format"): If Number of Multisamples is set to a value other than MULTISAMPLECOUNT_1, this field cannot be set to the following formats: - any format with greater than 64 bits per element - any compressed texture format (BC*) - any YCRCB* format Gen7 has a similar, but less stringent limitation: formats with >64 bits of data per pixel only support 4x MSAA. This patch causes the unsupported formats to report GL_FRAMEBUFFER_UNSUPPORTED. Fixes piglit "multisample-formats" tests on Gen6. Acked-by: Kenneth Graunke <[email protected]>
* st/vdpau: use template size as default for source_rect.Christian König2012-06-201-3/+10
| | | | | | Fixes alignment problems with flash player. Signed-off-by: Christian König <[email protected]>
* st/vdpau: clear Cb&Cr with 0.5fChristian König2012-06-201-2/+5
| | | | | | That makes the output black in case of decoding errors. Signed-off-by: Christian König <[email protected]>
* i965: Don't set brw_wm_prog_key::iz_lookup on Gen6+.Kenneth Graunke2012-06-191-18/+20
| | | | | | | | Sandy Bridge and later don't use this field, so there's no point in setting it. It can only cause harmful state-based recompiles. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* llvmpipe: Add vertex id support.Olivier Galibert2012-06-194-19/+42
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Simplify and fix system variables fetch.Olivier Galibert2012-06-194-78/+33
| | | | | | | | | | | | | | The system array values concept doesn't really because it expects the system values to be fixed per call, which is wrong for gl_VertexID and iffy for gl_SampleID. So this patch does two things: - kill the array, have emit_fetch_system_value directly pick the values it needs (only gl_InstanceID for now, as the previous code) - correctly handle the expected type in emit_fetch_system_value Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>