summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Introduce a "render ring prelude" hook.Kenneth Graunke2013-11-212-0/+10
| | | | | | | | | | The new intel_batchbuffer_emit_render_ring_prelude() hook will be called when switching from BLT or UNKNOWN_RING to RENDER_RING. This provides a place to emit state that should go at the start of each render ring batch, with minimal overhead. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Introduce an UNKNOWN_RING state.Kenneth Graunke2013-11-213-3/+17
| | | | | | | | | | | | | | | | | | | When we first create a batch buffer, it's empty. We don't actually know what ring it will be targeted at until the first BEGIN_BATCH or BEGIN_BATCH_BLT macro. Previously, one could determine the state of the batch by checking brw->batch.ring (blit vs. render) and brw->batch.used != 0 (known vs. unknown). This should be functionally equivalent, but the tri-state enum is a bit clearer. v2: Catch three explicit require_space callers (thanks to Carl and Eric). v3: Split the boolean -> enum change from the UNKNOWN_RING change. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Convert brw->batch.is_blit to a BLT_RING/RENDER_RING enum.Kenneth Graunke2013-11-216-23/+29
| | | | | | | | Passing BLT_RING or RENDER_RING to batchbuffer functions is a lot more obvious than passing true or false. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* llvmpipe: calculate more accurate interpolation value at originRoland Scheidegger2013-11-211-6/+82
| | | | | | | | | | | | | | | | | Some rounding errors could crop up when calculating a0. Use a more accurate method (barycentric interpolation essentially) to fix this, though to fix the REAL problem (which is that our interpolation will give very bad results with small triangles far away from the origin when they have steep gradients) this does absolutely nothing (actually makes it worse). (To fix the real problem, either would need to use a vertex corner (or some other point inside the tri) as starting point value instead of fb origin and pass that down to interpolation, or mimic what hw does, use barycentric interpolation (using the coordinates extracted from the rasterizer edge functions) - maybe another time.) Some (silly) tests though really want a high accuracy at fb origin and don't care much about anything else (Just. Don't. Ask.). Reviewed-by: Jose Fonseca <[email protected]>
* svga: remove special-case code for texkil w componentBrian Paul2013-11-211-23/+6
| | | | | | Not actually needed. Fixes piglit ARB_fragment_program/kil-swizzle test. Reviewed-by: José Fonseca <[email protected]>
* gallium: Make TGSI_SEMANTIC_FOG register four-component wide.José Fonseca2013-11-215-19/+19
| | | | | | | | | | | | | | | | | | | | | | | D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component restriction TGSI_SEMANTIC_FOG from Gallium interface - updates the Mesa state tracker to enforce output fog has (f, 0, 0, 1) - draw module was updated to leave TGSI_SEMANTIC_FOG output registers alone Several gallium drivers that are going out of their way to clear TGSI_SEMANTIC_FOG components could be simplified in the future. Thanks to Si Chen and Michal Krol for identifying the problem. Testing done: piglit fogcoord-*.vpfp tests Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi_exec: Fix mask calculation for emit_kill_if.José Fonseca2013-11-211-0/+3
| | | | | | | | | | Same as Si Chen's commit e7a5905d8a3960b0981750f8131e3af9acbfcdb8 for tgsi_exec module. Not actually tested, because softpipe is failing the test that caught this bug due to unrelated issues. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: Use IROUND instead of roundf.José Fonseca2013-11-211-1/+1
| | | | roundf is not available on MSVC.
* mesa: enable GL_TEXTURE_LOD_BIAS set/getTapani Pälli2013-11-211-8/+8
| | | | | | | | | | | | | | Earlier comments suggest this was removed from GL core spec but it is still there. Enabling makes 'texture_lod_bias_getter' Khronos conformance tests pass, also removes some errors from Metro Last Light game which is using this API. v2: leave NOTE comment (Ian) Cc: "9.0 9.1 9.2 10.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Tapani Pälli <[email protected]>
* winsys/radeon: cleanup virtual memory nonsenseChristian König2013-11-212-20/+18
| | | | | | | | The alignment of a virtual memory area must always be at least 4096 bytes. It only worked because size was aligned to 4096 outside of the function. Signed-off-by: Christian König <[email protected]>
* mesa: Update MESA_INFO to eliminate errorCourtney Goeltzenleuchter2013-11-213-5/+9
| | | | | | | | | | | | If a user set MESA_INFO and the OpenGL application uses a 3.0 or later context then the MESA_INFO debug output will have an error when it queries for extensions using the deprecated enum GL_EXTENSIONS. Passing context argument allows code to return extension list directly regardless of profile. Commit title updated as recommended by Kenneth Graunke. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Disable BLORP on Broadwell for now.Kenneth Graunke2013-11-214-5/+8
| | | | | | | | | BLORP is essential. However, porting it to Gen8 is a huge amount of work. Disabling it for now allows us to proceed with basic hardware enablement. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Disable HiZ on Broadwell for now.Kenneth Graunke2013-11-211-1/+1
| | | | | | | | | HiZ is difficult to implement, and while it's essential for performance, we don't need it right away for purposes of hardware enabling. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Claim OpenGL 3.3 support on Broadwell.Kenneth Graunke2013-11-211-0/+1
| | | | | | | Bugs aside, basically everything ought to work. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add device info structs for Broadwell.Kenneth Graunke2013-11-211-0/+29
| | | | | | | | As always, the chipset limits here are placeholders, rather than the actual values. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Use more portable bash invocation construct.Vinson Lee2013-11-2026-26/+26
| | | | | | | | | Fixes 'make check' on distros where bash is not at /bin/bash. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]>
* gallivm: Ignore unknown file type in non-debug builds.Vinson Lee2013-11-201-0/+1
| | | | | | | Fixes "Uninitialized pointer read" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* glx: don't fail out when no configs if we have visualsDave Airlie2013-11-211-1/+1
| | | | | | | | | | GLX 1.2 servers with no SGIX_fbconfigs exist (some citrix thing), and we fail glxinfo completely in those cases. CC: <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/swrast: fix inverted front buffer rendering with old-school swrastDave Airlie2013-11-211-2/+2
| | | | | | | | | | | | | | I've no idea when this broke, but we have some people who wanted it fixed, so here's my attempt. reproducer, run readpix with swrast hit f, or run trival tri -sb things are upside down, after this patch they aren't. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62142 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66213 Cc: <[email protected]>" Signed-off-by: Dave Airlie <[email protected]>
* mesa: Fix setup of LocalParams array.Eric Anholt2013-11-202-7/+14
| | | | | | | | | | | | | | | | | | | i965 passed piglit, but swrast and gallium both segfaulted without this. i965 happened to work because it never ran _mesa_load_state_parameters() on the new program before the test called glProgramLocalParameter(), which was allocating a LocalParams array for the fallback path. v2: Since v1 threw away old localparams data, leaked old LocalParams memory, only fixed fragment programs, and I was dubious of my previous invariants already (nothing but program_parse.y will generate LocalParams, and only that one path of program_parse.y will), just late-allocate localparams at the other point of dereferencing them. This adds overhead to _mesa_load_state_parameter, which is uncomfortable, but I'm pretty sure that giant switch statement is super slow already. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71734 Tested-by: Michel Dänzer <[email protected]>
* i965/test: Use unreachable() to silence warning.Matt Turner2013-11-201-0/+1
|
* i965: Link -ldl after libmesa.laMatt Turner2013-11-201-1/+1
| | | | | | | | DLOPEN_LIBS is part of DRI_LIB_DEPS. Cc: "10.0" <[email protected]>" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71512 Reviewed-by: Eric Anholt <[email protected]>
* i965: Add a pass to remove dead control flow.Matt Turner2013-11-205-0/+114
| | | | | | | | | | | | | Removes IF/ENDIF and IF/ELSE/ENDIF with no intervening instructions. total instructions in shared programs: 1360393 -> 1360387 (-0.00%) instructions in affected programs: 157 -> 151 (-3.82%) (no change in vertex shaders) Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make invalidate_live_intervals() a virtual method of backend_visitor.Matt Turner2013-11-201-0/+2
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Add invalidate_live_intervals method.Matt Turner2013-11-206-7/+14
| | | | | Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Don't emit SIMD16 BFI instructions.Matt Turner2013-11-201-1/+22
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Emit compressed 3-source instructions on Haswell.Matt Turner2013-11-201-3/+3
| | | | | | | | | | | | For commit 4df56177 Paul discovered that the hardware restriction that Align16 instructions cannot be compressed was lifted on Haswell. This has prevented us from emitting compressed three-source instructions. For added confirmation, the bspec lists a work around called WaBreakSimd16TernaryInstructionsIntoSimd8 that hasn't been applicable since very early Haswell silicon. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix disassembled names of BFI1 and BFI2 instructions.Matt Turner2013-11-201-2/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use source's original type in register_coalesce().Matt Turner2013-11-201-0/+1
| | | | | | | | | | | | | | | | Previously, register_coalesce() would modify mov vgrf1:f vgrf2:f cmp null vgrf3:d vgrf1:d to be cmp null vgrf3:d vgrf2:f and incorrectly use vgrf2's type in the instruction that the mov was coalesced into. Reviewed-by: Kenneth Graunke <[email protected]>
* u_gen_mipmap: Use untampered cubemap texture coords when generating mipmaps.José Fonseca2013-11-205-6/+19
| | | | | | | | | | | | | | | | | | | It's not necessary to scale down cubemap texture coords when generating mipmaps: we are doing a 2x minification therefore it's guaranteed that the texture coords will always be at least 1 texel away of the edges. Scaling down can actually be harmful, as it may cause artefacts when generating mipmaps with nearest filtering. Sample points will lie exactly in the middle each 2x2 texels, so the scaling factor was causing different texels to be take on each quadrant of the cube face. This is apparent with a 1x1 checkerboard pattern in the base mipmap level: instead of next mipmap level receiving a constant color throughout the face, it will have different colors for each quadrant of the face. The behaviour for blits is left untouched for now, but the cubemap texture coord scaling hack should be reconsidered eventually. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GL_FEEDBACK mode inverted Y coordinate bugBrian Paul2013-11-191-2/+4
| | | | | | | | | | We need to check the drawbuffer's orientation before inverting Y coordinates. Fixes piglit feedback tests when running with the -fbo option. Cc: "9.2" "10.0" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: Fix mask calculation for emit_kill_if.Si Chen2013-11-191-5/+8
| | | | | | | | | | The exec_mask must be taken in consideration, just like emit_kill above. The tgsi_exec module has the same bug and should be fixed in a future change. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* i965/gen7: Disallow Y tiling of renderable surfaces with valign of 2.Paul Berry2013-11-191-0/+17
| | | | | | | | Gen7 does not allow render targets to have a vertical alignment of 2. So, when creating a surface, if its format is renderable, and its vertical alignment is 2, force it to use X tiling. Reviewed-by: Eric Anholt <[email protected]>
* i965/gen7: Prefer vertical alignment of 4 when possible.Paul Berry2013-11-191-3/+22
| | | | | | | | | | | | | Gen6+ allows for color buffers to use a vertical alignment of either 4 or 2. Previously we defaulted to 2. This may have caused problems on Gen7 because Y-tiled render targets are not allowed to use a vertical alignment of 2. This patch changes the vertical alignment to 4 on Gen7, except for the few formats where a vertical alignment of 2 is required. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Fix broken IR annotation in debug output.Paul Berry2013-11-191-1/+0
| | | | | | | | | | | | Commit 70953b5 (i965: Initialize all member variables of vec4_instruction on construction) inadvertently added a line to the vec4_instruction constructor setting this->ir to NULL, wiping out the previously set value. As a result, ever since then, the output of INTEL_DEBUG=vs and INTEL_DEBUG=gs has been missing IR annotations. Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* svga: improve check for 3D compressed texturesBrian Paul2013-11-191-5/+7
| | | | | | | | | | | This is basically a a respin of f1dfcf4bce35e6796f873d9a00103b280da81e4c per Jose's suggestion. Just set the SVGA3dSurfaceFormatCaps flags for 3D and cube textures when checking the texture format capabilities. This will filter out unsupported combinations like 3D+DXT. Reviewed-by: Jose Fonseca <[email protected]>
* glx/tests: Provide __glXGetCurrentContext() stub when neededJon TURNEY2013-11-191-0/+8
| | | | | | | Refine 8c533022. Provide a stub __glXGetCurrentContext() function when $(DEFINES) are such that it is not a macro. Signed-off-by: Jon TURNEY <[email protected]>
* svga: we don't supported 3D compressed texturesBrian Paul2013-11-181-0/+6
| | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* st/mesa: pass correct pipe_texture_target to st_choose_format()Brian Paul2013-11-181-2/+4
| | | | | | | | We were always passing PIPE_TEXTURE_2D, but not all formats are supported for all types of textures. In particular, the driver may not supported texture compression for all types of textures. Reviewed-by: Jakob Bornecrantz <[email protected]>
* r600g/compute: Fix handling of global buffers in r600_resource_copy_region()Tom Stellard2013-11-181-1/+36
| | | | | | | | | | | Global buffers do not have an associate cs_buf handle, so we can't copy them using r600_copy_buffer() https://bugs.freedesktop.org/show_bug.cgi?id=64226 Reviewed-by: Marek Ol????k <[email protected]> CC: "10.0" <[email protected]>
* gallium: Pass version scripts to linker using --version-script=Tom Stellard2013-11-184-4/+4
| | | | | | This fixes build failures with the gold linker. CC: "10.0" <[email protected]>
* clover: Optionally return context's devices from clGetProgramInfo()Tom Stellard2013-11-181-2/+6
| | | | | | | | | | | | | The spec allows clGetProgramInfo() to return information about either the devices associated with the program or the devices associated with the context. If there are no devices associated with the program, then we return devices associated with the context. https://bugs.freedesktop.org/show_bug.cgi?id=52171 Reviewed-by: Francisco Jerez <[email protected]> CC: "10.0" <[email protected]>
* i965/gen7: Emit workaround flush when changing GS enable state.Paul Berry2013-11-187-22/+72
| | | | | | | | | | v2: Don't go to extra work to avoid extraneous flushes. (Previous experiments in the kernel have suggested that flushing the pipeline when it is already empty is extremely cheap). Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* osmesa: add missing commaBrian Paul2013-11-181-1/+1
|
* osmesa: add support for postprocess filtersBrian Paul2013-11-182-0/+98
| | | | | | | | | | Add new OSMesaPostprocess() function to allow using the gallium postprocessing filters. This only works for OSMesa with gallium drivers, not the legacy swrast OSMesa. Bump OSMESA_MAJOR/MINOR_VERSION numbers to 10.0 Reviewed-by: Marek Olšák <[email protected]>
* postprocess: document the pp_init() function.Brian Paul2013-11-181-1/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* postprocess: move #defines to filters.hBrian Paul2013-11-182-3/+4
| | | | | | They're not needed in postprocess.h Reviewed-by: Marek Olšák <[email protected]>
* postprocess: refactor header files, etcBrian Paul2013-11-188-47/+70
| | | | | | | | | Move private data structures and function prototypes out of the public postprocess.h header file. Create a pp_private.h for the shared, private data structures, functions. Remove pp_program.h header. Reviewed-by: Marek Olšák <[email protected]>
* postprocess: rename program to pp_programBrian Paul2013-11-188-23/+23
| | | | | | To match the pp_ namespace convention. Reviewed-by: Marek Olšák <[email protected]>
* postprocess: simplify pp_free() codeBrian Paul2013-11-181-14/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>