summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-28i965: Fix gl_TessLevelOuter[] for isolines.11.2-nextKenneth Graunke2-6/+22
Thanks to James Legg for finding this! From the ARB_tessellation_shader spec: "The number of isolines generated is derived from the first outer tessellation level; the number of segments in each isoline is derived from the second outer tessellation level." According to the PRM, "TF.LineDensity determines # lines" while "TF.LineDetail determines # segments". Line Density is stored at DWord 6, while Line Detail is at DWord 7. So, they're not reversed like they are for triangles and quads. Fixes Piglit's spec/arb_tessellation_shader/execution/isoline, and about 24 dEQP isoline tests (with GL_EXT_tessellation_shader hacked on - it's not normally enabled). Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94524 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 5b2d8c2273c6f48e764a1386240ec674cb4aa4ad)
2016-03-28i965: Push most TES inputs in vec4 mode.Kenneth Graunke2-34/+54
(This is commit 4a1c8a3037cd29938b2a6e2c680c341e9903cfbe for vec4 mode.) Using the push model for inputs is much more efficient than pulling inputs - the hardware can simply copy a large chunk into URB registers at thread creation time, rather than having the thread send messages to request data from the L3 cache. Unfortunately, it's possible to have more TES inputs than fit in registers, so we have to fall back to the pull model in some cases. However, it turns out that most tessellation evaluation shaders are fairly simple, and don't use many inputs. An arbitrary cut-off of 24 vec4 slots (12 registers) should suffice. (I chose this instead of the 32 vec4 slots used in the scalar backend to avoid regressing a few Piglit tests due to the vec4 register allocator being too stupid to figure out what to do. We probably ought to fix that, but it's a separate issue.) Improves performance in GPUTest's tessmark_x64 microbenchmark by 41.5394% +/- 0.288519% (n = 115) at 1024x768 on my Clevo W740SU (with Iris Pro 5200). Improves performance in Synmark's Gl40TerrainFlyTess microbenchmark by 38.3576% +/- 0.759748% (n = 42). v2: Simplify abs/negate handling, as requested by Matt. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 24994ae926629ac8521df3cab4a02eb81de15907)
2016-03-28nvc0: disable primitive restart and index bias during blitsIlia Mirkin1-0/+11
Back in the dawn of time, we used to do immediate uploads for the vertex data, and all was well. However Maxwell dropped support for immediate vertex data, so we started feeding in a VBO (in all cases). But we forgot to disable some things that apply in such cases, specifically primitive restart and index bias. The latter was causing WoW and other Blizzard games trouble as they use a pattern where they draw with a base vertex (aka index bias), followed by texture uploads (aka blits, internally). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91526 Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Karol Herbst <nouveau@karolherbst.de> (cherry picked from commit 41100b6b44e747b9003937f123fce571fd3dec46)
2016-03-28nvc0/ir: fix picking of coordinates from tex instruction for textureGradIlia Mirkin1-1/+11
On Fermi, there's an argument in front of the coords that combines array and indirect handle, while on Kepler the array and the indirect handle are separate (and in front of the coords). We were previously only accounting for the array bit of it, if there were an indirect access it wouldn't be counted in the formula. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit f667d15561820ee9dd8e836d43cce3ee52a4780e)
2016-03-28i965: Fix assert conditions for src/dst x/y offsetsAnuj Phogat1-3/+3
Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 4ba47f7b2adf71ed100cd390a1a9fbd4434e896a)
2016-03-28r600/sb: Do not distribute neg in expr_handler::fold_assoc() when folding ↵xavier1-2/+6
multiplications. Previously it was doing this transformation for a Trine 3 shader: MUL R6.x.12, R13.x.23, 0.5|3f000000 - MULADD R4.x.12, -R6.x.12, 2|40000000, 1|3f800000 + MULADD R4.x.12, -R13.x.23, -1|bf800000, 1|3f800000 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94412 Signed-off-by: Xavier Bouchoux <xavierb@gmail.com> Cc: "11.0 11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit fce0b55ccbc33d320b9734a53c2a9f7886450c73)
2016-03-28nvc0: make sure to delete samplers used by compute shadersSamuel Pitoiset1-1/+1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9efd8b590f716bb7766ae6816bc080e7ef60a010)
2016-03-28st/mesa: use the texture view's format for render-to-textureNicolai Hähnle1-7/+15
Aside from the bug below, it fixes a simplistic test I've written locally, and I see no regression in Piglit for radeonsi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94595 Cc: "11.0 11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit a8b315b8271e867db30650dedb52e53d8dd9667c)
2016-03-28st/omx/dec: Correct the timestampingNishanth Peethambaran4-8/+34
Attach the timestamp to the dpb buffer and use that timestamp while pushing buffer from dpb list to the omx client. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nishanth Peethambaran <nishanth.peethambaran@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit eeb117a09d6c0eb2b4fa94d55e8015c8aa982727)
2016-03-28st/omx: Remove trailing spacesNishanth Peethambaran3-31/+31
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Nishanth Peethambaran <nishanth.peethambaran@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 46de6bbb775602ab237d0054e5351b0fc90d942b)
2016-03-28nv50/ir: fix indirect texturing for non-array textures on nvc0Ilia Mirkin1-3/+7
If a layer parameter is provided, we want to flip it to position 0 (and combine it with any indirect params). However if the target is not an array, there is no layer, so we have to shift all of the arguments down by one to make room for it. This fixes situations where there were non-coordinate parameters, such as bias, lod, depth compare, explicit derivatives. Instead of adding a new parameter at the front for the indirect reference, we would swap one of those in its place. Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.compute.*shadow Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reported-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7d98bfedd73d632041d27ff12ccf7c7be74a2ddd)
2016-03-28st/mesa: only minify depth for 3d targetsIlia Mirkin1-1/+4
We make sure that that image depth matches the level's depth before copying it into place. However we should only be minifying the first level's depth for 3d textures - array textures have the same depth for all levels. This fixes tests such as dEQP-GLES3.functional.texture.specification.texsubimage3d_depth.* and I suspect account for a number of other odd situations I've run into where level > 0 of array textures was messed up. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit adb40a739943d62508b9c79cbd85e3c67ee3b43b)
2016-03-28nv50/ir: normalize cube coordinates after derivatives have been computedIlia Mirkin4-15/+84
In "manual" derivative mode (always used on nv50 and sometimes on nvc0 but always for cube), the idea is that using the quadop instruction, we set up the "other" quads to have values such that the derivatives work out, and then run the texture instruction as if nothing were strange. It pulls values from the other lanes, and does its magic. However cube coordinates have to be normalized - one of the 3 coords has to be 1, to determine which is the major axis, to say which face is being sampled. We were normalizing the coordinates first, and then adding the derivatives. This is wrong for two reasons: - the coordinates got normalized by a scaling factor but the derivatives didn't - the result of the addition didn't end up normalized To resolve this, we flip the logic around to normalize *after* the per-lane coordinates are set up. This fixes a bunch of textureGrad cube dEQP tests. NOTE: nv50 cube arrays with explicit derivatives are still broken, to be resolved at a later date. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 6eeb284e4f74a2fe5ae6cba90f97f219935e24df)
2016-03-28nv50/ir: force-enable derivatives on TXD opsIlia Mirkin2-1/+4
This matters especially in vertex shaders, where derivatives are disabled by default. This fixes textureGrad in vertex shaders on nv50. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit d2445b00837c9123b59a1ac743c136546f334504)
2016-03-28nv50: reset TFB bufctx when we no longer hold a reference to the buffersIlia Mirkin2-4/+4
This fix is analogous to commit ff085d014. This fixes some use-after-free situations in dEQP when an xfb state is removed, and then a clear is triggered, which only does a partial validation. It would attempt to read the no-longer-valid buffers, resulting in crashes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit d1b85dbffa0eec2b44bb2a9f339a2617a39730da)
2016-03-28egl: support EGL_LARGEST_PBUFFER in eglCreatePbufferSurface(...)Daniel Czarnowski3-1/+13
Patch provides a default for a set pbuffer surface size when EGL_LARGEST_PBUFFER is used by the client. MIN2 macro is moved to egldefines so that it can be shared. Fixes following Piglit test: egl-create-largest-pbuffer-surface From EGL 1.5 spec: "Use EGL_LARGEST_PBUFFER to get the largest available pbuffer when the allocation of the pbuffer would otherwise fail." Currently there exists no API to query largest available pixmap size using xlib or xcb so right now this seems most straightforward way to ensure that we fulfill above API and also we don't attempt to allocate 'too big' pixmap which might succeed on server side but not work in practice when driver starts to use it as a texture. v2: add more explanation about the change (Emil) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit d4714512e4077b8079efe526d7823e19fdb9be37)
2016-03-28radeonsi: fix Hyper-Z hangs on P2 configsMarek Olšák1-2/+8
Cc: 11.1 11.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 4ab2ac334921ae9bbd1791adaf8977fccf744580)
2016-03-28llvmpipe: fix lp_rast_plane alignment on 32bitRoland Scheidegger2-0/+8
Some rasterization code relies (for sse) on the first and third planes (but not the second for now) being 128bit aligned, and we didn't get that on 32bit - I mistakenly thought the 64bit number in the struct would get the thing aligned to 64bit even on 32bit archs. Stephane Marchesin really figured this out. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit bb2c5e657b5f4c55bcec49a8d96f352ed4c1e013)
2016-03-28draw: fix line stipplingRoland Scheidegger1-15/+15
The logic was comparing actual ints, not true/false values. This meant that it was emitting always multiple line segments instead of just one even if the stipple test had the same result, which looks inefficient, and the segments also overlapped thus breaking line aa as well. (In practice, with the no-op default line stipple pattern, for a 10-pixel long line from 0-9 it was emitting 10 segments, with the individual segments ranging from 0-1, 0-2, 0-3 and so on.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94193 Reviewed-by: Jose Fonseca <jfonseca@vmware.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 12a4f0bed6ff03031587e1eb6d69f18b131f5655)
2016-03-28softpipe: fix anisotropic filtering crashRoland Scheidegger1-2/+7
The filt_args->offset wasn't assigned but was always used later leading to a crash (as far as I can tell, texel offsets don't actually make much sense with anisotropic filtering, but because there's no explicit setting if offsets are enabled there the array is always accessed). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94481 Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9e9d69979c7aff7dac2d670af950f4a50273bcde)
2016-03-28i965/vec4: Consider removal of no-op MOVs as progress during register coalesce.Francisco Jerez1-0/+1
Bug found by the liveness analysis validation pass that will be introduced in a later commit. The no-op MOV check in opt_register_coalesce() was removing instructions which makes the cached liveness analysis calculation inconsistent with the shader IR. We were failing to set progress to true in that case though, which means that invalidate_live_intervals() wouldn't necessarily be called at the end of the function. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 7d7990cf657550be4d038a0424ffdc0ef7fd8faa)
2016-03-28i965/fs: Add missing analysis invalidation in fixup_3src_null_dest().Francisco Jerez1-0/+6
Bug found by the liveness analysis validation pass that will be introduced in a later commit. fixup_3src_null_dest() was allocating registers which makes the cached liveness analysis calculation incomplete, so it must be invalidated. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 93be4158aed9accab06e3df2d8c526d3312bfff8)
2016-03-28i965/fs: Add missing analysis invalidation in opt_sampler_eot().Francisco Jerez1-1/+4
Bug found by the liveness analysis validation pass that will be introduced in a later commit. opt_sampler_eot() was allocating registers and inserting and removing instructions, which makes the cached liveness analysis calculation inconsistent with the shader IR, so it must be invalidated. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 6691c03fd39be463e1d222b56e3ec8da9f3b7f24)
2016-03-28clover: Fix pipe_grid_info.indirect not being initialized.Hans de Goede1-1/+1
After pipe_grid_info.indirect was introduced, clover was not modified to set it causing it to pass uninitialized memory for it to launch_grid. This commit fixes this by zero-ing the entire pipe_grid_info struct when declaring it, to avoid similar problems popping-up in the future. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> [ Francisco Jerez: Trivial codestyle fix. ] Reviewed-by: Francisco Jerez <currojerez@riseup.net> (cherry picked from commit 4d02e91e4938c98bcf9d4e57ab2e5463bb42e836)
2016-03-28nvc0: fix blit triangle size to fully cover FB's > 8192x8192Ilia Mirkin1-4/+4
The idea is that a single triangle will cover the whole area being drawn, allowing the blit shader to do its work. However the max fb size is 16384x16384, which means that the triangle we draw needs to be twice that in order to cover the whole area fully. Increase the size of the triangle to 32768x32768. This fixes a number of dEQP tests that were failing because a blit was involved which would miss some of the resulting texture. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a651bc027d5ed4150bb5240fc9f46a6ca569f665)
2016-03-28radeonsi: avoid crash when a sampler state is bound for a buffer textureNicolai Hähnle1-0/+1
Sampler states don't really make sense with buffer textures, but they can be set anyway, so we need to be defensive here. This bug was lurking for a while and was finally noticed due to PBO uploads setting sampler states. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94284 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Laurent Carlier <lordheavym@gmail.com> Tested-by: Shawn Starr <shawn.starr@rogers.com> (cherry picked from commit 28d2a7e67c4e8a9835710e5775cd758aa7e27f47)
2016-03-28r600g: clear compressed_depthtex/colortex_mask when binding buffer textureNicolai Hähnle1-12/+12
Found by inspection of the source based on a bisected bug report. This bug has been in the code for a long time, but the more recent PBO upload feature exposed it because it leads to more uses of buffer textures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94388 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "11.0 11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e502801d9843984233426f1b31e42bf6095d63be)
2016-03-28egl/x11: check the return value of xcb_dri2_get_buffers_reply()Emil Velikov1-0/+3
... before using it. The function can return NULL, which we should check prior to refererencing it in the next function(s). Cc: Fabian Vogt <fvogt@suse.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93667 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> (cherry picked from commit b9c5c4af6dbfab28b1f0a78e41bffff1b2e06ce9)
2016-03-28radeon/uvd: disable MPEG1Christian König1-0/+1
The hardware simply doesn't support that correctly. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e148a3b6e9e5c5cd941b70edb67e82058a8187a5)
2016-03-28tgsi: fix parsing of shared memory declarationsSamuel Pitoiset1-1/+3
The SHARED TGSI keyword is only allowed with TGSI_FILE_MEMORY and not with TGSI_FILE_BUFFER. I have found this by using the nouveau_compiler from command line. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7f8565f0b2bf54a8106ae9080386bb186609713d)
2016-03-28glsl: avoid stack smashing when there are too many attributesIlia Mirkin1-0/+7
This fixes a crash in dEQP-GLES3.functional.transform_feedback.array_element.separate.points.lowp_mat3x2 and likely others. The vertex shader has > 16 input variables (without explicit locations), which causes us to index outside of the to_assign array. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit f6827e20d12ab062440bc809b8f2338b68edac45)
2016-03-28nvc0: reset TFB bufctx when we no longer hold a reference to the buffersIlia Mirkin2-3/+4
This fixes some use-after-free situations in dEQP when an xfb state is removed, and then a clear is triggered, which only does a partial validation. It would attempt to read the no-longer-valid buffers, resulting in crashes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ff085d014ed8ccce230769575e50924561218d98)
2016-03-28swrast: fix GL_ANY_SAMPLES_PASSED values in ResultIlia Mirkin1-0/+5
Since commit 922be4eab, the expectation is that the query result contains the correct value. Unfortunately swrast does not distinguish between GL_SAMPLES_PASSED and GL_ANY_SAMPLES_PASSED. As a result, we must fix up the query result in a post-draw fixup. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94274 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit dcbf8377befde50fe4d75738e2af5813e06e8f04)
2016-03-28i965: Only magnify depth for 3D textures, not array textures.Kenneth Graunke1-1/+1
When BaseLevel > 0, we magnify the dimensions to fill out the size of miplevels [0..BaseLevel). In particular, this was magnifying depth, thinking that the depth doubles at each level. This is perfectly reasonable for 3D textures, but dead wrong for array textures. Changing the depth != 1 condition to a target == GL_TEXTURE_3D check should make this only happen in the appropriate cases. Fixes about 32 dEQP tests: - dEQP-GLES31.functional.texture.gather.*.level_{1,2} Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 4ba7ad6cc13b087e5e95073ab2e24de591d8b5a5)
2016-03-28winsys/svga: Increase the fence timeoutThomas Hellstrom1-1/+2
If running with a software renderer backend, the timeout may be insufficient, and we don't want to release busy buffers too early. In practice, SVGA gpu lockups are extremely rare. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 395c7b8fa17069fe996a63a8bca2bfd0fe3f16a0)
2016-03-28winsys/svga: Fix an uninitialized return valueThomas Hellstrom1-0/+2
Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviwed-by: Brian Paul <brianp@vmware.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 24ad7e16cd0fb67c8646e8860cfb382a260a9126)
2016-03-07Update version to 11.2.0-rc3Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-03-04mesa: Allow Get*() of several forgotten IsEnabled() pnames.Kenneth Graunke2-0/+5
From section 6.2 ("State Tables") of the GL 2.1 specification (the text also appears in the GL 3.0 and ES 3.1 specifications): "However, state variables for which IsEnabled is listed as the query command can also be obtained using GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev." GL_DEBUG_OUTPUT, GL_DEBUG_OUTPUT_SYNCHRONOUS, and GL_FRAGMENT_SHADER_ATI were missing from the glGet*() functions. All other IsEnabled() pnames look to be present, as far as I can tell. Fixes 8 dEQP-GLES31.functional.debug.state_query subtests: debug_output[_synchronous]_get{boolean,float,integer,integer64}. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit aa37cbdff7bb1d2170f1603b02a8b8517255894f)
2016-03-04mesa: Make glGet queries initialize ctx->Debug when necessary.Kenneth Graunke1-14/+6
dEQP-GLES31.functional.debug.state_query.debug_group_stack_depth_* tries to call glGet on GL_DEBUG_GROUP_STACK_DEPTH right away, before doing any other debug setup. This should return 1. However, because ctx->Debug wasn't allocated, we bailed and returned 0. This patch removes the open-coded locking and switches the two glGet functions to use _mesa_lock_debug_state(), which takes care of allocating and initializing that state on the first time. It also conveniently takes care of unlocking on failure for us, so we don't need to handle that in every caller. Fixes dEQP-GLES31.functional.debug.state_query.debug_group_stack_depth_ {getboolean,getfloat,getinteger,getinteger64}. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit b4b50b074beae9b679e5acdbb4b49193e539576d)
2016-03-04radeonsi: Do colorformat endian swap for PIPE_USAGE_STAGINGOded Gabbay1-5/+1
There is an old if statement (dated to 2011) that prevented doing endian swap for colorformat, in case the buffer is marked as PIPE_USAGE_STAGING. This is now wrong because st_ReadPixels() reads into a destination texture that is marked with PIPE_USAGE_STAGING. Therefore, even if the texture is rendered correctly to the monitor, when reading it back we get unswapped/wrong values. This patch makes the check_rgba() function in gl-1.0-readpixsanity piglit test pass in big-endian. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 914d4967d723c58ec073eef677237798c2dc9751)
2016-03-04r600g: Do colorformat endian swap for PIPE_USAGE_STAGINGOded Gabbay2-17/+2
There is an old if statement (dated to 2011) that prevented doing endian swap for colorformat, in case the buffer is marked as PIPE_USAGE_STAGING. This is now wrong because st_ReadPixels() reads into a destination texture that is marked with PIPE_USAGE_STAGING. Therefore, even if the texture is rendered correctly to the monitor, when reading it back we get unswapped/wrong values. This patch makes the check_rgba() function in gl-1.0-readpixsanity piglit test pass in big-endian. v2: removed duplicate call to r600_colorformat_endian_swap() inside evergreen_init_color_surface_rat() Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit ef5183faea98dfdaa1ca0c7368c4678a031dd804)
2016-03-04glsl: Initialize gl_shader_program::EmptyUniformLocations.Matt Turner2-1/+2
Commit 65dfb30 added exec_list EmptyUniformLocations, but only initialized the list if ARB_explicit_uniform_location was enabled, leading to crashes if the extension was not available. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (cherry picked from commit f3b68fc5fc806cbfd5e7d79b8679fd2bcbae71f4)
2016-03-04virgl: add support for passing render condition flags to host.Dave Airlie2-1/+5
This just passes the extra blit info to fix the render condition tests. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit ac222626adfc7a03bf537deba66bad5e57b2c91d)
2016-03-04mesa/fbobject: propogate Layered when reusing attachments.Dave Airlie1-0/+1
When reusing a depth attachment as a stencil, we need to propogate the layered bit, otherwise we fail to complete the framebuffer. discovered running ./bin/fbo-depth-array depth-layered-clear on virgl on haswell. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 35859d5bbba998aa41ec87bc53d946add4662dea)
2016-03-04st/nine: Fix second Multithreading issue with MANAGED buffersAxel Davy1-0/+3
Here is another threading issue with MANAGED buffers: Thread 1: buffer creation Thread 1: buffer lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Without this patch, the buffer is initially dirty and in the list of things to upload after its creation. The draw call will then upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced by cc0114f30b587a10766ec212afb3ad356099ef23: "st/nine: Implement Managed vertex/index buffers" Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit 83bc2acfe90fd2e503bab4b5a586c1e2822863f5)
2016-03-04st/nine: Fix Multithreading issue with MANAGED buffersAxel Davy1-2/+6
d3d calls are protected by mutexes, however if app is doing in two threads: Thread 1: buffer Lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Then before this patch, the Draw call would begin to upload the buffer. Solves this by moving the moment we add the buffer to the queue of things to upload (We move it from Lock time to Unlock time). Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit 44246fe99d4c880b70a58043624bf023237009f5)
2016-03-04st/nine: Handle READONLY for buffer MANAGED poolAxel Davy1-7/+10
READONLY won't trigger an upload. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit 35c858c42c818d5bf5b4bfee03a342df52acface)
2016-03-04st/nine: Use Position input helper for ps3 declared inputsAxel Davy1-0/+7
When the semantic is Position (which can happen with index 0 only), use the helper to get Position input. Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit 8a8affdfdace486f4e416e66e2dd0ed122505a90)
2016-03-04st/nine: Introduce helper for Position shader inputAxel Davy1-16/+15
Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit f08c990af53e91114257b19e5679e2dbbc277e45)
2016-02-29Update version to 11.2.0-rc2Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>