- Nov 18, 2013
-
-
Ian Romanick authored
-
- Nov 15, 2013
-
-
Aaron Watry authored
Prevents a memory leak. v2: Remove null check CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2be85e24)
-
Aaron Watry authored
radeon_llvm_compile allocates memory for binary.code, binary.config, or neither depending on what's being done. We need to make sure to free that memory after it's no longer needed. v2: Don't bother checking for null before FREE() CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 01f3622c)
-
Aaron Watry authored
use memset to initialize to 0's... otherwise code_size and config_size could be uninitialized when read later in this method. It's also hard to do NULL checks on uninitialized pointers. Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> v2: Fix indentation CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit dd73b994)
-
Brian Paul authored
After we blit/copy to a dest texture image we need to mark it as being defined. This fixes broken mipmap generation for quite a few texture formats. Mipgen involves making texture views and svga_texture_view_surface() skips texture images that are undefined. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
José Fonseca <jfonseca@vmware.com> Reviewed-by:
Roland Scheidegger <sroland@vmware.com> (cherry picked from commit 3969330b)
-
Brian Paul authored
The index translation code expects the number of indexes to be consistent with the primitive type (ex: a multiple of 3 for PIPE_PRIM_TRIANGLES). If it's not, we can write out of bounds in the destination buffer. Fixes failed assertions in the pipebuffer debug code found with Piglit primitive-restart-draw-mode test. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
José Fonseca <jfonseca@vmware.com> (cherry picked from commit 79984b99)
-
Aaron Watry authored
Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 598f61ba)
-
Aaron Watry authored
v2: Fix indentation Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4c6ac9e6)
-
Aaron Watry authored
v2: Fix indentation Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 35dad4a1)
-
Aaron Watry authored
v2: Fix indentation Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit d41b10f8)
-
Aaron Watry authored
v2: Fix indentation Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a2b93da8)
-
Aaron Watry authored
Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit df482fe0)
-
Tom Stellard authored
v2: - Use clGetDeviceIDs to query devices. Reviewed-by:
Francisco Jerez <currojerez@riseup.net> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 17af4dd5)
-
Paul Berry authored
Previously, when doing intrastage and interstage interface block linking, we only checked the interface type; this prevented us from catching some link errors. We now check the following additional constraints: - For intrastage linking, the presence/absence of interface names must match. - For shader ins/outs, the interface names themselves must match when doing intrastage linking (note: it's not clear from the spec whether this is necessary, but Mesa's implementation currently relies on it). - Array vs. nonarray must be consistent, taking into account the special rules for vertex-geometry linkage. - Array sizes must be consistent (exception: during intrastage linking, an unsized array matches a sized array). Note: validate_interstage_interface_blocks currently handles both uniforms and in/out variables. As a result, if all three shader types are present (VS, GS, and FS), and a uniform interface block is mentioned in the VS and FS but not the GS, it won't be validated. I plan to address this in later patches. Fixes the following piglit tests in spec/glsl-1.50/linker: - interface-blocks-vs-fs-array-size-mismatch - interface-vs-array-to-fs-unnamed - interface-vs-unnamed-to-fs-array - intrastage-interface-unnamed-array v2: Simplify logic in intrastage_match() for handling array sizes. Make extra_array_level const. Use an unnamed temporary interface_block_definition in validate_interstage_interface_blocks()'s first call to definitions->store(). Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit f38ac41e)
-
Paul Berry authored
From the Sandy Bridge PRM, Vol 1 Part 1 7.18.3.4 (Alignment Unit Size): j [vertical alignment] = 4 for any render target surface is multisampled (4x) From the Ivy Bridge PRM, Vol 4 Part 1 2.12.2.1 (SURFACE_STATE for most messages), under the "Surface Vertical Alignment" heading: This field is intended to be set to VALIGN_4 if the surface was rendered as a depth buffer, for a multisampled (4x) render target, or for a multisampled (8x) render target, since these surfaces support only alignment of 4. Back in 2012 when we added multisampling support to the i965 driver, we forgot to update the logic for computing the vertical alignment, so we were often using a vertical alignment of 2 for multisampled buffers, leading to subtle rendering errors. Note that the specs also require a vertical alignment of 4 for all Y-tiled render target surfaces; I plan to address that in a separate patch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53077 Cc: mesa-stable@lists.freedesktop.org Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Reviewed-by:
Eric Anholt <eric@anholt.net> (cherry picked from commit b4c3b833)
-
Paul Berry authored
For both vertex and fragment shaders we default MaxUniformComponents to 4 * MAX_UNIFORMS. It makes sense to do this for geometry shaders too; if back-ends have different limits they can override them as necessary. Fixes piglit test: spec/glsl-1.50/built-in constants/gl_MaxGeometryUniformComponents Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Reviewed-by:
Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 46e9f78e)
-
Fredrik Höglund authored
AEcontext::NewState is not always set when the vertex array state is changed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71492 Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
José Fonseca <jfonseca@vmware.com> Reviewed-by:
Brian Paul <brianp@vmware.com> (cherry picked from commit ff353c21)
-
Ian Romanick authored
This silences some compiler warnings in i915 and i965. See also 75982a5d. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a15a19f0)
-
Ian Romanick authored
Systems with little physical memory installed will report less than 2GiB, and some systems may (hypothetically?) have a larger address space for the GPU. My IVB still reports 1534. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit cb6182bd)
-
Ian Romanick authored
Send the zombie back to the grave before it infects the townsfolk. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9fe108db)
-
Kristian Høgsberg authored
createContextAttribs is a superset of what createNewContext provides. Also remove the function typedef, since createNewContext is deprecated and no longer used in multiple interfaces. Signed-off-by:
Kristian Høgsberg <krh@bitplanet.net> Reviewed-by:
Eric Anholt <eric@anholt.net> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e0489531)
-
Kristian Høgsberg authored
This lets us allocate color buffers as __DRIimages and pass them into the driver instead of having to create a __DRIbuffer with the flink that requires. Signed-off-by:
Kristian Høgsberg <krh@bitplanet.net> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Chad Versace <chad.versace@linux.intel.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 68bb26be)
-
Kristian Høgsberg authored
This lets us allocate color buffers as __DRIimages and pass them into the driver instead of having to create a __DRIbuffer with the flink that requires. With this patch, we can now run gbm on render-nodes. A render-node is a drm device that doesn't support modesetting and all the legacy DRI ioctls. flink is also not supported, but now that gbm doesn't need flink, we can run piglit on head-less gbm or head-less GPGPU. Signed-off-by:
Kristian Høgsberg <krh@bitplanet.net> Reviewed-by:
Chad Versace <chad.versace@linux.intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Jordan Justen <jordan.l.justen@intel.com> Tested-by:
Jordan Justen <jordan.l.justen@intel.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 04e3ef00)
-
Ander Conselvan de Oliveira authored
Planar images have format __DRI_IMAGE_FORMAT_NONE, but the patch that moved the conversion from dri_format to the mesa format made it impossible to allocate a image with that format. Signed-off-by:
Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by:
Kristian Høgsberg <krh@bitplanet.net> Reviewed-by:
Eric Anholt <eric@anholt.net> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5ba6be26)
-
Emma Anholt authored
Since LIFO fails on some shaders in one particular way, and non-LIFO systematically fails in another way on different kinds of shaders, try them both, and pick whichever one successfully register allocates first. Slightly prefer non-LIFO in case we produce extra dependencies in register allocation, since it should start out with fewer stalls than LIFO. This is madness, but I haven't come up with another way to get unigine tropics to not spill while keeping other programs from not spilling and retaining the non-unigine performance wins from texture-grf. total instructions in shared programs: 1626728 -> 1626288 (-0.03%) instructions in affected programs: 1015 -> 575 (-43.35%) GAINED: 50 LOST: 0 Improves Unigine Tropics performance by 14.5257% +/- 0.241838% (n=38) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70445 Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit e9daead7)
-
Emma Anholt authored
Long ago, the HW_REG usage in assign_curb/urb_setup() were scheduling barriers, so we had to run scheduler before them in order for it to be able to do basically anything. Now that that's fixed, we can delay the scheduling until we go to allocate (which will make the next change less scary). Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit fbd8303a)
-
Emma Anholt authored
We care about depth-until-program-end, as a proxy for "make sure I schedule those early instructions that open up the other things that can make progress while keeping register pressure low", not actual latency (since we're relying on the post-register-alloc scheduling to actually schedule for the hardware). total instructions in shared programs: 1609931 -> 1609931 (0.00%) instructions in affected programs: 0 -> 0 GAINED: 55 LOST: 43 Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit f72a0d99)
-
Emma Anholt authored
In the SIMD16 spilling changes, I replaced a "1" in the spill path with "mlen", but obviously it wasn't mlen before because spills have the g0 header along with the payload. The interface I was trying to use was asking for how many physical regs we're writing, so we're looking for "1" or "2". I'm guessing this actually passed piglit because the high 8 bits of the execution mask in SIMD8 mode are all 0s. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Paul Berry <stereotype441@gmail.com> (cherry picked from commit 7c90947a)
-
Emma Anholt authored
Previously, the best thing we had was to schedule the things unblocked by the last chosen instruction, on the hope that it would be consuming two values at the end of their live intervals while only producing one new value. But that's just a guess, and we can do counting of usage of registers to know when an instruction would (almost surely) reduce register pressure. The only failure mode I know of in this new dominant heuristic is that inside of a loop when scheduling the iterator (for example), choosing the last use of the iterator doesn't actually reduce the live interval of the iterator. But it doesn't seem to matter in shader-db: total instructions in shared programs: 1618700 -> 1618700 (0.00%) instructions in affected programs: 0 -> 0 GAINED: 13 LOST: 0 Note: The new functions are made virtual because I expect we'll soon lift the pre-regalloc scheduling heuristic over to the vec4 backend. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit bc0e3bb4)
-
Emma Anholt authored
Fixes a compiler warning. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit 9b3e1592)
-
Francisco Jerez authored
Fixes infinite loop in find_grid_optimal_factor() in cases where the user specifies a grid size with less dimensions than the device supports. Reported-by:
Tom Stellard <thomas.stellard@amd.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 99d447cc)
-
Cyril Brulebois authored
Thanks to Pino Toscano. Patch from Debian package. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by:
Brian Paul <brianp@vmware.com> (cherry picked from commit 2d77e4f9)
-
Petr Sebor authored
Otherwise, the function would enable generic vertex attributes 0 and 1 of the array object it does not own. This was causing crashes in Euro Truck Simulator 2, since the incorrectly enabled generic attribute 0 in the foreign context got precedence before vertex position attribute at later time, leading to NULL pointer dereference. Cc: "9.2" <mesa-stable@lists.freedesktop.org> Cc: "10.0" <mesa-stable@lists.freedesktop.org> Signed-off-by:
Petr Sebor <petr@scssoft.com> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Brian Paul <brianp@vmware.com> (cherry picked from commit f2b844f5)
-
Brian Paul authored
We try to do all error checking before changing any GL state. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit ce193d4f)
-
Ilia Mirkin authored
Adding a vl_mpeg-based helper didn't seem to work, as it produced data that the card couldn't handle. (And I didn't investigate further.) This makes the decoding functionality only accessible via XvMC and avoids crashes when attempting to use VDPAU. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 08122e15)
-
Ilia Mirkin authored
It doesn't work, I don't know why, but no point in hanging people's displays until it gets figured out. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e8d5d340)
-
Tom Stellard authored
This fixes a crash in glamor when mesa links against static LLVM. v2: - Inline LINKER_SCRIPT variable v3: Kai Wasserbäch - Fix out out-of-tree-builds Tested-by:
Kai Wasserbäch <kai@dev.carbon-project.or> (cherry picked from commit 594fa4a2)
-
Tom Stellard authored
This works now that pipe_*.so is no longer exporting LLVM symbols. Tested-by:
Kai Wasserbäch <kai@dev.carbon-project.or> (cherry picked from commit cb080a10)
-
Tom Stellard authored
This makes it possible to use clover with statically linked LLVM. v2: - Inline LINKER_SCRIPT variable v3: Kai Wasserbäch - Fix out out-of-tree-builds Tested-by:
Kai Wasserbäch <kai@dev.carbon-project.or> (cherry picked from commit 6d6c7492)
-
Tom Stellard authored
(cherry picked from commit a8591310)
-