aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* i965: Remove unneeded VS workaround stalls on Baytrail.Greg Hunt2014-06-264-6/+6
| | | | | | | | | | | | | According to the workarounds list, these stalls aren't needed on production Baytrail systems. Piglit confirms that as well. These cause a small slowdown when we are sending a large number of small batches to the GPU. Removing these improves performance by up to 5% on some CPU bound SynMark tests (Batch[4-7], DrvState1, HdrBloom, Multithread, ShMapPcf). Signed-off-by: Gregory Hunt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* softpipe: use last_level from sampler view, not from the resourceRoland Scheidegger2014-06-261-19/+20
| | | | | | | | | The last_level from the sampler view may be limited by the state tracker to a value lower than what the base texture provides. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=80541. Reviewed-by: Brian Paul <[email protected]>
* targets/automake.inc: s/GALLIUM_VIDEO_CFLAGS/GALLIUM_TARGET_CFLAGS/Emil Velikov2014-06-264-4/+4
| | | | | | | The flags are not specific to the video targets plus we can reuse them for targets/xa and targets/gbm. Signed-off-by: Emil Velikov <[email protected]>
* auxiliary/vl: Remove no longer used SPLIT_TARGETSEmil Velikov2014-06-261-8/+0
| | | | | | | | | Required for the conversion stage of all VL targets to a single library per API (static/shared pipe-drivers). No longer required as per last commit. Signed-off-by: Emil Velikov <[email protected]>
* targets/radeonsi/omx: convert to static/shared pipe-driversEmil Velikov2014-06-265-72/+12
| | | | | | | | | | | | | | | | | | | The radeonsi counterpart of previous commit - now libomx-radeonsi is built into the libomx-mesa library. Providing a single library per API. v2: Include the radeon winsys only when there is a user for it. v3: Correcly include the winsys. Now with extra brown bag :\ Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio This patch concludes the unification. Now libomx-mesa will be used for all hardware - r600, radeonsi and nouveau. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* targets/r600/omx: convert to static/shared pipe-driversEmil Velikov2014-06-264-51/+18
| | | | | | | | | | | | | | | | | | | | | The r600 counterpart of previous commit - now the libomx-r600 is built into the libomx-mesa library. Providing a single library per API. v2: Include the radeon winsys only when there is a user for it. v3: Correcly include the winsys. Now with extra brown bag :\ Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio If you have more than one omx library (libomx-radeonsi, libomx-r600), make sure to temporary move the unused one. By the end of the series there will be only one library that will be used for all hardware - r600, radeonsi and nouveau. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* targets/omx-nouveau: convert to static/shared pipe-driversEmil Velikov2014-06-267-68/+73
| | | | | | | | | | | | | | | | | | | Similar to the vdpau/xvmc targets, we're going to convert the multiple target libraries into a single one. The library can be built with the relevant pipe-drivers statically linked in, or loaded as shared modules. Currently we default to static. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio If you have more than one omx library (libomx-radeonsi, libomx-r600), make sure to temporary move the unused one. By the end of the series there will be only one library that will be used for all hardware - r600, radeonsi and nouveau. Signed-off-by: Emil Velikov <[email protected]>
* st/omx: avoid using dynamic vid_(enc|dec)_base and avc_(name|role)Emil Velikov2014-06-264-94/+18
| | | | | | | | | | | | | | | | | | | | | | | | Strictly speaking we should not have done this in the first place, as all of the above should be static across the system. Currently this may cause some minor issues, which will be resolved in the following patches, by providing a single library for the OMX api. Cleanup a few unneeded strcpy cases while we're around. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio If you have more than one omx library (libomx-radeonsi, libomx-r600), make sure to temporary move the unused one. By the end of the series there will be only one library that will be used for all hardware - r600, radeonsi and nouveau. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/omx: provide constant number of componentsEmil Velikov2014-06-261-8/+7
| | | | | | | | | | | | The number of components and their names/roles should be kept constant as all of that information cached. Note: Make sure to rebuild the .omxregister file, by executing $ omxregister-bellagio. Cc: Leo Liu <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* glx: Added missing null check in GetDrawableAttribute()Juha-Pekka Heikkila2014-06-261-4/+8
| | | | | | | For GLX_BACK_BUFFER_AGE_EXT query added extra null check. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/main: In register_surface() verify gl_texture_object was foundJuha-Pekka Heikkila2014-06-261-0/+6
| | | | | | | Verify _mesa_lookup_texture() returned valid pointer before using it. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/main: Verify calloc return value in register_surface()Juha-Pekka Heikkila2014-06-261-0/+5
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add missing null check in push_back()Juha-Pekka Heikkila2014-06-261-2/+11
| | | | | | | Report memory error on realloc failure and don't leak any memory. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: check _mesa_hash_table_create return value in link_uniform_blocksJuha-Pekka Heikkila2014-06-262-0/+8
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Check variable_storage return value in fs_visitor::visitJuha-Pekka Heikkila2014-06-261-0/+6
| | | | | | | check variable_storage() found the requested fs_reg. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Handle miptree creation failure in intel_alloc_texture_storage()Juha-Pekka Heikkila2014-06-261-0/+3
| | | | | | | | Check intel_miptree_create() return value before using it as a pointer. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Check calloc return value in gather_statistics_results()Juha-Pekka Heikkila2014-06-261-1/+14
| | | | | | | | Check calloc return value and report on error, also later skip results handling if there was no memory to store results to. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vec4: Try constant propagate after copy propagate made progress.Matt Turner2014-06-251-2/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Make try_copy_propagate() static.Matt Turner2014-06-252-7/+4
| | | | | | | Now that can_do_source_mods() isn't part of the visitor, this doesn't need to be either. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Rename try_copy/constant_propagat{ion,e} to match the fs.Matt Turner2014-06-252-8/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Constant propagate into 2-src math instructions on Gen8.Matt Turner2014-06-251-2/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Constant propagate into 2-src math instructions on Gen8.Matt Turner2014-06-251-2/+9
| | | | | | | total instructions in shared programs: 1878133 -> 1876986 (-0.06%) instructions in affected programs: 153007 -> 151860 (-0.75%) Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Make try_constant_propagate() static.Matt Turner2014-06-252-3/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make can_do_source_mods() a member of the instruction classes.Matt Turner2014-06-256-14/+12
| | | | | | | Pretty nonsensical to have it as a method of the visitor just for access to brw. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Treat an interface block specifier as a level of struct nestingChris Forbes2014-06-261-0/+8
| | | | | | | | | Fixes the piglit test: spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block-instanced.vert Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Disallow primitive type layout qualifier on variables.Chris Forbes2014-06-261-0/+7
| | | | | | | | | | | | | | | | This only makes any sense on the GS input or output layout declaration, nowhere else. Fixes the piglit tests: * spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom * spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom * spec/glsl-1.50/compiler/layout-fs-no-output.frag * spec/glsl-1.50/compiler/layout-vs-no-input.vert * spec/glsl-1.50/compiler/layout-vs-no-output.vert Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Relax combinations of layout qualifiers with other qualifiers.Chris Forbes2014-06-261-28/+8
| | | | | | | | | | | | | | | | | | | Previously we disallowed any combination of layout with interpolation, invariant, or precise qualifiers. There is very little spec guidance on exactly which combinations should be allowed, but with ARB_sso it's useful to allow these qualifiers with rendezvous-by-location. Since it's unclear exactly where the layout qualifier should appear when combined with other qualifiers, we will allow it anywhere before the auxiliary storage qualifier. This allows enough flexibility for all examples I've seen, while keeping the auxiliary-storage-qualifier / storage-qualifier pair together (as they are a single qualifier in the spec prior to ARB_shading_language_420pack) Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Don't convert reductions of ivec to a dot-productIan Romanick2014-06-251-1/+3
| | | | | | | | | | | | | | | | | | Mesa has an optimization that converts expressions like "v.x + v.y + v.z + v.w" into dot(v, 1.0). And therein lies the rub: the other operand to the dot-product is always a float... even if the vector is an ivec or uvec. This results in an assertion failure in ir_builder. If the base type of the operand is not float, don't try the optimization. Dot-product is not valid on integer data. Fixes piglit vs-integer-reduction.shader_test and OpenGL ES conformance test ES2-CTS.gtf.GL2Tests.glGetUniform.glGetUniform. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Christoph Brill <[email protected]>
* llvmpipe: Fix zero-division in llvmpipe_texture_layout()Takashi Iwai2014-06-251-1/+1
| | | | | | | | | | | Fix the crash of "gnome-control-center info" invocation on QEMU where zero height is passed at init. (sroland: simplify logic by eliminating the div altogether, using 64bit mul.) Fixes: https://bugzilla.novell.com/show_bug.cgi?id=879462 Cc: "10.2" <[email protected]>
* i965/fs: Don't fix_math_operand() on Gen >= 8.Matt Turner2014-06-241-2/+4
| | | | | | Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vec4: Don't fix_math_operand() on Gen >= 8.Matt Turner2014-06-241-2/+6
| | | | | | | | The emit_math?_gen? functions serve to implement workarounds for the math instruction, none of which exist on Gen8+. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vec4: Don't return void from a void function.Matt Turner2014-06-241-4/+4
| | | | | | Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* r600g/compute: Defer the creation of the temporary resourceBruno Jiménez2014-06-242-20/+28
| | | | | | | | | | | | | | | For the first use of a buffer, we will only need the temporary resource in the case that a user wants to write/map to this buffer. But in the cases where the user creates a buffer to act as an output of a kernel, then we were creating an unneeded resource, because it will contain garbage, and would be copied to the pool, and destroyed when promoting. This patch avoids the creation and copies of resources in this case. Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Handle failures in compute_memory_pool_finalizeJan Vesely2014-06-241-1/+4
| | | | | Reviewed-by: Bruno Jiménez <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* r600g/compute: Fix possible endless loop in compute_memory_pool allocations.Jan Vesely2014-06-241-2/+5
| | | | | | | | | | | | The important part is the change of the condition to <= 0. Otherwise the loop gets stuck never actually growing the pool. The change in the aux-need calculation guarantees max 2 iterations, and avoids wasting memory in case a smaller item can't fit into a relatively larger pool. Reviewed-by: Bruno Jiménez <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* r600: Fix use after free in compute_memory_promote_item.Jan Vesely2014-06-241-1/+2
| | | | | | | | | | The dst pointer needs to be initialized after any calls to compute_memory_grow_pool, as the function might change the pool->vbo pointer. This fixes crashes and assertion failures in two gegl tests. Reviewed-by: Bruno Jiménez <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* nouveau: dup fd before passing it to deviceIlia Mirkin2014-06-241-2/+17
| | | | | | | | | | | | | | | | nouveau screens are reused for the same device node. However in the scenario where we create screen 1, screen 2, and then delete screen 1, the surrounding code might also close the original device node. To protect against this, dup the fd and use the dup'd fd in the nouveau_device. Also tell the nouveau_device that it is the owner of the fd so that it will be closed on destruction. Also make sure to free the nouveau_device in case of any failure. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79823 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]>
* mesa: Don't use derived vertex state in api_arrayelt.cFredrik Höglund2014-06-241-54/+57
| | | | | Cc: "10.1 10.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nvc0: allow VIEWPORT_INDEX and LAYER to be used as input semanticsIlia Mirkin2014-06-231-0/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* mesa/st: handle gl_Layer input semanticIlia Mirkin2014-06-231-0/+5
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* nv50/ir: allow gl_ViewportIndex to work on non-provoking verticesTobias Klausmann2014-06-232-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if we had something like: gl_ViewportIndex = idx; for(int i = 0; i < gl_in.length(); i++) { gl_Position = gl_in[i].gl_Position; EmitVertex(); } EndPrimitive(); The right viewport index would not be set on the primitive because the last vertex is the provoking one. However blob drivers appear to move the gl_ViewportIndex write into the for loop, allowing the application to be ignorant of this detail. While the application is technically wrong here, because the blob does it and other drivers appear to implicitly work this way as well, we add a buffer register that viewport index writes go into, which is then exported before every EmitVertex() call. This fixes the remaining piglit tests in ARB_viewport_array for nv50/nvc0. Signed-off-by: Tobias Klausmann <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* draw: (trivial) fix clamping of viewport indexRoland Scheidegger2014-06-241-1/+1
| | | | | | | | | | | | | | The old logic would let all negative values go through unclamped, with potentially disastrous results (probably trying to fetch viewport values from random memory locations). GL has undefined rendering for vp indices outside valid range but that's a bit too undefined... (The logic is now the same as in llvmpipe.) CC: "10.1 10.2" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* i965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell.Kenneth Graunke2014-06-232-8/+15
| | | | | | | | | | | | | As far as I can tell, Broadwell doesn't need any of the SURFACE_STATE workarounds for textureGather() bugs, so there's no need to emit a second set of identical copies. To keep things simple, just point the gather surface index base to the same place as the texture surface index base. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Cc: "10.2" <[email protected]>
* targets/(vdpau|xvmc): hardlink against the installed libraryEmil Velikov2014-06-232-3/+3
| | | | | | | | | | | | With commit 11e46a32aed and f9ebb1ea771 we resolved the symlink generation required by the versioning of the library. Although they incorrectly changed the way hardlinks are created by linking to the ones from the build tree. If the device used for building differs from the one set as destination linking will fail. Reported-by: Andy Furniss <[email protected]> Tested-by: Andy Furniss <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* i965: Allow the blorp blit between BGR and RGBNeil Roberts2014-06-231-7/+21
| | | | | | | | | | | | | | | | | | | | Previously the blorp blitter would only be used if the format is identical or there is only a difference between whether there is an alpha component or not. This patch makes it also allow the blorp blitter if the only difference is the ordering of the RGB components (ie, RGB or BGR). This is particularly useful since commit 61e264f4fcdba3623 because Mesa now prefers RGB ordering for textures but the window system buffers are still created as BGR. That means that the blorp blitter won't be used for the (probably) common case of blitting from a texture to the window system buffer. This doesn't cause any regressions in the FBO piglit tests on Haswell. On Sandybridge it causes the fbo-blit-stretch test to fail but that is only because it was failing anyway before the above commit and that commit hid the problem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68365 Reviewed-by: Matt Turner <[email protected]>
* glsl: Silence many unused parameter warningsIan Romanick2014-06-231-1/+1
| | | | | | | | In file included from ../../src/glsl/builtin_functions.cpp:61:0: ../../src/glsl/glsl_parser_extras.h:154:9: warning: unused parameter 'var' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* targets/xvmc: correctly generate the symlinksEmil Velikov2014-06-231-6/+6
| | | | Signed-off-by: Emil Velikov <[email protected]>
* targets/vdpau: correctly generate the symlinksEmil Velikov2014-06-231-5/+5
| | | | | Reported-by: David Heidelberger <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* i915: Fix gen2 texblend setupVille Syrjälä2014-06-231-1/+1
| | | | | | | | | | | | | | | | | Fix an off by one in the texture unit walk during texblend setup on gen2. This caused the last enabled texunit to be skipped resulting in totally messed up texturing. This is a regression introduced here: commit 1ad443ecdd694dd9bf3c4a5050d749fb80db6fa2 Author: Eric Anholt <[email protected]> Date: Wed Apr 23 15:35:27 2014 -0700 i915: Redo texture unit walking on i830. Reviewed-by: Ian Romanick <[email protected]> Cc: "10.2" <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]>
* mesa: Make Geom.UsesEndPrimitive a bool instead of a GLbooleanIago Toral Quiroga2014-06-232-3/+3
|