summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-20mesa: Reduce libGL.so binary size by about 15%11.1Arlie Davis1-16/+41
Ok, here's v2 of the change, with the suggested edits. From 5f393faa058f453408dfc640eecae3fe6335dfed Mon Sep 17 00:00:00 2001 From: Arlie Davis <arlied@google.com> Date: Tue, 15 Sep 2015 09:58:34 -0700 Subject: [PATCH] This patch significantly reduces the size of the libGL.so binary. It does not change the (externally visible) behavior of libGL.so at all. gl_gentable.py generates a function, _glapi_create_table_from_handle. This function allocates a large dispatch table, consisting of 1300 or so function pointers, and fills this dispatch table by doing symbol lookups on a given shared library. Previously, gl_gentable.py would generate a single, very large _glapi_create_table_from_handle function, with a short cluster of lines for each entry point (function). The idiom it generates was a NULL check, a call to snprintf, a call to dlsym / GetProcAddress, and then a store into the dispatch table. Since this function processes a large number of entry points, this code is duplicated many times over. We can encode the same information much more compactly, by using a lookup table. The previous total size of _glapi_create_table_from_handle on x64 was 125848 bytes. By using a lookup table, the size of _glapi_create_table_from_handle (and the related lookup tables) is reduced to 10840 bytes. In other words, this enormous function is reduced by 91%. The size of the entire libGL.so binary (measured when stripped) itself drops by 15%. So the purpose of this change is to reduce the binary size, which frees up disk space, memory, etc. (cherry picked from commit 2a2c8fa7d480d83dac73b0e4e89c79a3777309b6)
2016-01-20applegl: Provide requirements of _SET_DrawBuffersJon TURNEY2-1/+7
_SET_DrawBuffers requires driDispatchRemapTable, so we need to link with libmesa for remap.c. libmesa requires the C++ linker. Also need to arrange to call _mesa_init_remap_table() to initialize the remap table. XXX: There has to be a better way fixing this. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> (cherry picked from commit 9800301a312ac06e0ce0af20e5817ee1e44ed4a5)
2016-01-20darwin: Suppress type conversion warnings for GLhandleARBJon TURNEY1-3/+3
On darwin, GLhandleARB is defined as a void *, not the unsigned int it is on linux. For the moment, apply a cast to supress the warning Possibly this is safe, as for the mesa software renderer the shader program handle is not a real pointer, but a integer handle Probably this is not the right thing to do, and we should pay closer attention to how the GLhandlerARB type is used. main/shader_query.cpp:49:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:111:13: error: no matching function for call to '_mesa_lookup_shader_program_err' shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:218:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> (cherry picked from commit 24eefbd4ca271f22400549dd44ccd409263089e1)
2016-01-20glext.h: Add missing include of stddef.h for ptrdiff_tJeremy Huddleston Sequoia1-0/+1
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commit c07669e721c99206fe67dd0c0f8b592b2975b685)
2016-01-13docs: add sha256 checksums for 11.1.1Emil Velikov1-1/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-13docs: add release notes for 11.1.1Emil Velikov1-0/+196
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-13Update version to 11.1.1Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-08mesa: Add KBL PCI IDs and platform information.Sarah Sharp2-0/+82
Add PCI IDs for the Intel Kabylake platforms. The IDs are taken directly from the Linux kernel patches, which are under review: http://lists.freedesktop.org/archives/intel-gfx/2015-October/078967.html http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=kbl-upstream-v2 The Kabylake PCI IDs taken from the kernel are rearranged to be in order of GT type, then PCI ID. Please note that if this patch is backported, the following fixes will need to be added before this patch: commit 28ed1e08e8ba98e "i965/skl: Remove early platform support" commit c1e38ad37042b0e "i965/skl: Use larger URB size where available." Thanks to Ben for fixing a bug around setting urb.size, and being patient with my questions about what the various fields mean. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Suggested-by: Ben Widawsky <benjamin.widawsky@intel.com> Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (KBL-GT2) Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 39c41be50d9474dde4c0dcf23a546d14b212e80a)
2016-01-08st/mesa: check state->mesa in early return check in st_validate_state()Brian Paul1-1/+1
We were checking the dirty->st flags but not the dirty->mesa flags. When we took the early return, we didn't clear the dirty->mesa flags so the next time we called st_validate_state() we'd often flush the glBitmap cache. And since st_validate_state() is called from st_Bitmap(), it meant we flushed the bitmap cache for every glBitmap() call. This change seems to recover most of the performance loss observed with the ipers demo on llvmpipe since commit commit 36c93a6fae27561. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit c28d72a3473ad0127c82c1244b6688dcc184e85e)
2016-01-08nir: Add a lower_fdiv option, turn fdiv into fmul/frcp.Kenneth Graunke3-0/+3
The nir_opt_algebraic rule (('fadd', ('flog2', a), ('fneg', ('flog2', b))), ('flog2', ('fdiv', a, b))), can produce new fdiv operations, which need to be lowered on i965, as we don't actually implement fdiv. (Normally, we handle this in GLSL IR's lower_instructions pass, but in the above case we introduce an fdiv after that point. So, make NIR do it for us.) Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 7295f4fcc2b2dd1bc6a8d1d834774b8152a029cf)
2016-01-08nvc0: scale up inter_bo size so that it's 16M for a 4K videoIlia Mirkin1-2/+5
Experimentally, 4M causes corruption and slowness, try to ramp it up with size instead. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit b16c9be4a5561bd825176a228c300331f989e837)
2016-01-08nv50,nvc0: fix crash when increasing bsp bo size for h264Ilia Mirkin2-4/+4
H264 doesn't have a bitplane bo. We just need a device reference, so use the one from the client. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit b5f2f7073f047b4e4128cf05af8dddf356f9b48c)
2016-01-08st/mesa: fix GLSL uniform updates for glBitmap & glDrawPixels (v2)Marek Olšák5-19/+25
Spotted by luck. The GLSL uniform storage is only associated once in LinkShader and can't be reallocated afterwards, because that would break the association. v2: don't remove st_upload_constants calls, clarify why they're needed Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 36c93a6fae275614b6004ec5ab085774d527e1bc)
2016-01-08program: add _mesa_reserve_parameter_storageMarek Olšák2-15/+36
The next commit will use this. Reviewed-by: Brian Paul <brianp@vmware.com> Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> (cherry picked from commit 294ed5cd13e878ec43126a2070343d6d99ef5669)
2016-01-08nv50,nvc0: make sure there's pushbuf space and that we ref the bo earlyIlia Mirkin4-6/+5
First off, we can't flush in the middle of a command. Secondly requesting the extra push space might cause a flush to happen. If that flush happens, we'd have to do the PUSH_REFN again. So instead do PUSH_REFN after the push space request. This helps avoid rare crashes with supertuxkart in libdrm due to assertion failures. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit c1d14c6817e3fa9a1c04f9b6c51b4ca601637843) [Emil Velikov: resolve trivial conflict] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
2016-01-08nvc0: Set winding order regardless of domain.Kenneth Graunke1-2/+4
Quads need to respect winding order, too - not just triangles. Fixes rendering in GFXBench 4.0's tessellation benchmark. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 65d3f85eb3efb326a826c2db0225340d5421a389)
2016-01-08glsl: Fix varying struct locations when varying packing is disabled.Kenneth Graunke1-11/+2
varying_matches::record tries to compute the number of components in each varying, which varying_matches::assign_locations uses to assign locations. With varying packing, it uses glsl_type::component_slots() to come up with a reasonable value. Without varying packing, it fell back to an open-coded computation that didn't bother to handle structs at all. I believe we can simply use 4 * glsl_type::count_attribute_slots(false), which already handles these cases correctly. Partially fixes rendering in GFXBench 4.0's tessellation benchmark. (NVE0 is almost right after this, but i965 is still mostly garbage.) Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7cdc2b9ca0ab60b282416b975a2ac6d7abcd42ad) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/glsl/link_varyings.cpp
2016-01-08glsl: only update doubles inputs for vertex inputs.Dave Airlie1-1/+4
This doesn't apply to other stages. This is only used in the mesa/st code, which needs further fixes. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 1fc39dae22843d6faf3ec43eab90c7d06f9f6f7b)
2016-01-08glsl: fix count_attribute_slots to allow for different 64-bit handlingDave Airlie5-11/+30
So vertex shader input attributes are handled different than internal varyings between shader stages, dvec3 and dvec4 only count as one slot for vertex attributes, but for internal varyings, they count as 2. This patch comments all the uses of this API to clarify what we pass in, except one which needs further investigation Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 5dc22cadb5ed4a7cf8c7d1cbaf7296c27e567e0f)
2016-01-08glsl/fp64: add helper for dual slot double detection.Dave Airlie2-9/+9
The old function didn't work for matrices, and we need this in other places to fix some other problems, so move to a helper in glsl type and fix the one user so far. A dual slot double is one that has 3 or 4 components in it's base type. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit d97b060e6f305ce4ad050881944404b920c86edf)
2016-01-08glsl: pass stage into mark functionDave Airlie1-4/+4
Don't use a bool here, as for some 64-bit fixes we need the stage. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 9fbcd8e8475e249c7f76b6d63b3a48b8684cb1ff)
2016-01-08drirc: Disable ARB_blend_func_extended for Heaven 4.0/Valley 1.0.Kenneth Graunke1-0/+8
Unigine Heaven 4.0 and Valley 1.0 use dual color blending but don't specify which fragment shader output is which, so there's at best a 50/50 chance of us guessing it correctly. This is invalid. Unigine fixed this in 4.1 and 1.1 versions over a year and a half ago, but hasn't actually released them for whatever reason. So, add the workaround back so that it works for most people. Fixes Heaven 4.0/Valley 1.0 rendering on Ivybridge. For whatever reason, Broadwell worked. 4.1 and 1.1 have always worked. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92233 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 4acf71c89b5ef5e2fe8c1a3d7ecf6031e191463c)
2016-01-08nv50/ir: float(s32 & 0xff) = float(u8), not s8Ilia Mirkin1-0/+3
Make sure to make conversion unsigned when we're ANDing the high bits away. Fixes corruption in dolphin. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 724134f68322087ef88bc590febd0011167ae367)
2016-01-08r600: fix constant buffer size programmingGrazvydas Ignotas2-2/+2
When buffer size is less than 16, zero ends up being programmed as size, which prevents the hardware from fetching the correct values. Fix it by combining shift and align so that the value is always rounded up. Cc: "11.1 11.0 10.6" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92229 Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit da0e216e069bd064199ed04b52de6fb23d810806)
2016-01-08nvc0: don't forget to reset VTX_TMP bufctx slot after blit completionIlia Mirkin1-0/+2
Also release the scratch allocation if any. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 109c348284843054f708f4403260739b7db18275)
2016-01-08gallium/radeon: fix regression in a number of driver queriesNicolai Hähnle1-3/+3
This rather silly mistake was introduced by commit 01910676. Cc: "11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit ea8c0b16ec222786c32bf6fc735613c25b28a6ca)
2016-01-08glx/dri3: a drawable might not be bound at wait timeIlia Mirkin1-2/+4
A trace of Alien Isolation hit this on nouveau. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit f7b71451231c75c36771e8b7b0d78f05e0d50f65)
2016-01-08ralloc: Fix ralloc_adopt() to the old context's last child's parent.Kenneth Graunke1-0/+1
I was cleverly using one iteration to obtain a pointer to the last item in ralloc's singly list child list, while also setting parents. Unfortunately, I forgot to set the parent on that last item. Cc: "11.1 11.0 10.6" <mesa-stable@lists.freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 14193e4643370db92210710f2ef152c693d6c4ff)
2016-01-08vc4: Keep sample mask writes from being reordered after TLB writesEric Anholt1-1/+2
Fixes a regression I noticed after introducing scheduling on the QIR. Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 960f48809ffebca14af27ce9e87eabc04dfe9b84)
2016-01-08freedreno/ir3: fix 32-bit builds with pointer-to-int-cast error enabledRob Herring1-1/+1
Android builds with -Werror=pointer-to-int-cast causing an error on 32-bit builds. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Clark <robclark@freedesktop.org> (cherry picked from commit b201a6ed9f6001ceaa1fc2eaf8a409b044ec97a3)
2016-01-08gallium/radeon: only dispose locally created target machine in ↵Nicolai Hähnle1-2/+3
radeon_llvm_compile Unify the cleanup paths of the function rather than duplicating code. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 0a6a17b9d72c57f0840d91756924632fee91f2c2)
2016-01-08mesa: Don't leak ATIfs instructions in DeleteFragmentShaderMiklós Máté1-1/+1
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7279453da5c847d8f63f7e1f9e30ac2b03e6b3e9)
2016-01-08configura.ac: fix test for SSE4.1 assembler supportOded Gabbay1-2/+3
This patch modifies the SSE4.1 test in configure.ac to use a global variable to initialize vector variables. In addition, we now return the value of the computation instead of 0. This is done so gcc 4.9 (and lower) won't optimize the SSE4.1 assembly instructions (when using -O1 and higher), because then the configure test might incorrectly pass even though the assembler doesn't support the SSE4.1 instructions (the test will pass because the compiler does support the intrinsics). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806 Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 6e44bbe0f5496b1aea2b4a29adae7990b62fda33)
2016-01-08configure: check for python2.7 for PYTHON2Jonathan Gray1-1/+1
Check for a 'python2.7' binary, 'python' and 'python2' are not provided by the OpenBSD python 2.7.x packages. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 4ef44bb484cbc0336d4fdcb8edce889ed1283732)
2016-01-08configure.ac: use pkg-config for libelfJonathan Gray3-6/+16
Use PKG_CHECK_MODULES to get the flags to link libelf v2: keep AC_CHECK_LIB as a fallback for elfutils provided libelf that doesn't install a pkg-config file. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit 7f585a6a98d0553ec0ba48e18b1d9bac1256881a)
2016-01-08nv50: free memory allocated by the prog which reads MP perf countersSamuel Pitoiset1-0/+5
This fixes a memory leak introduced in 6a9c151 ("nv50: add compute-related MP perf counters on G84+") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 695ae816da2fd9739eac769820bee8b7b4a87d95)
2016-01-08nv50,nvc0: free memory allocated by performance metricsSamuel Pitoiset6-4/+22
The destroy_query() helper was actually never called. This fixes a memory leak while monitoring performance metrics. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit aeee7f2a4dc7ceddace91ef5e91790483f4597e0)
2016-01-08nvc0: free memory allocated by the prog which reads MP perf countersSamuel Pitoiset1-0/+1
This fixes a long time ago memory leak (even before all my query related changes). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9aca60bfb07d87d82aff943a23cfa693e2712528)
2016-01-08i965: Fix crash when calling glViewport with no surface boundNeil Roberts1-2/+4
If EGL_KHR_surfaceless_context is used then glViewport can be called with NULL for the draw and read surfaces. This was previously causing a crash because the i965 driver tries to use this point to invalidate the surfaces and it was derferencing the NULL pointer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93257 Cc: Nanley Chery <nanley.g.chery@intel.com> Cc: "11.1" <mesa-stable@lists.freedesktop.org> Tested-by: Nanley Chery <nanley.g.chery@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> (cherry picked from commit 8c5310da9d1cbf2272f72d3ed4264544456a4683)
2016-01-08vc4: Warn instead of abort()ing on exec ioctl failures.Eric Anholt1-3/+5
It's really harsh to abort() the X Server because of a momentary failure (particularly -ENOMEM). I don't see a way to pass an -ENOMEM up the stack from here, but we can at least log to stderr before proceeding on. Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 02bcb443ee39cec1b61e5ba3e466471f3668f536)
2016-01-08meta/generate_mipmap: Work-around GLES 1.x problem with GL_DRAW_FRAMEBUFFERIan Romanick1-4/+13
GL_DRAW_FRAMEBUFFER does not exist in OpenGL ES 1.x, and since _mesa_meta_begin hasn't been called yet, we have to work-around API difficulties. The whole reason that GL_DRAW_FRAMEBUFFER is used instead of GL_FRAMEBUFFER is that the read framebuffer may be different. This is moot in OpenGL ES 1.x. I have another patch series that would also fix this (by removing the calls to _mesa_BindFramebuffer and friends), but it's not quite ready yet... and I think it may be a bit heavy for some stable branches. Consider this a stop-gap fix. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93215 Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> (cherry picked from commit 96dc732ed81f48d8bbc7aa6fb4d9c2833b691189)
2016-01-08glsl: assign varying locations to tess shaders when doing SSOIlia Mirkin1-4/+4
GRID Autosport uses SSO shaders. When a tessellation evaluation shader is passed through this, it triggers assertion failures down the line with unassigned varying locations. Make sure to do this when the first shader in the pipeline is not a vertex shader. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit eca8f38dcffb700fdfe413a707d524e6a84bd453)
2016-01-08cherry-ignore: don't pick a specific i965 formats patchEmil Velikov1-0/+3
commit 839793680f9 "MESA_FORMAT_B8G8R8X8_SRGB for RGB visuals" causes a handfull of regressions, some of which listed in fdo#92759. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-01-08i965: Add B8G8R8X8_SRGB to the alpha format overrideNeil Roberts1-0/+4
brw_init_surface_formats overrides the render format for RGBX formats which aren't supported for rendering so that they internally use RGBA instead. However, B8G8R8X8_SRGB was missing so it wasn't marked as a renderable format. This patch just adds it. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 43f4be5f06b7a96b96a3a7b43f5112139a1f423a)
2016-01-08i965: Add MESA_FORMAT_B8G8R8X8_SRGB to brw_format_for_mesa_formatNeil Roberts1-0/+1
This will be used in a subsequent patch as the format for RGB visuals. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit c769efda939e06338d41e1046a5f954c690951d5)
2016-01-08gk104/ir: simplify and fool-proof texbar algorithmIlia Mirkin2-83/+56
With the current algorithm, we only look at tex uses. However there's a write-after-write hazard where we might decide to, on some path, not use a texture's output at all, but instead to write a different value to that register. However without the barrier, the texture might complete later and overwrite that value. This fixes Unreal Elemental demo on GK110/GK208, flightgear on GK10x, and likely other random-looking failures. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7752bbc44e78e982de3cd4c34862adc38a338234)
2016-01-08nv50/ir: can't have predication and immediatesIlia Mirkin1-0/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 6aca7fecb7f7b6c67cf0315e781060a8d1d4b704)
2016-01-08gallium/radeon: fix Hyper-Z hangs by programming PA_SC_MODE_CNTL_1 correctlyMarek Olšák3-5/+18
This is the recommended setting according to hw people and it makes Hyper-Z stable. Just the two magic states. This fixes Evergreen, Cayman, SI, CI, VI (using the Cayman code). Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit d3c08309abd17b6e0d466b677af57e3cc74b0e00)
2016-01-08radeonsi: apply the streamout workaround to Fiji as wellMarek Olšák1-1/+3
Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 787ada6bf65a58b1bab5a30be86698e9b7b0797e)
2016-01-08radeonsi: don't call of u_prims_for_vertices for patches and rectanglesMarek Olšák1-1/+13
Both caused a crash due to a division by zero in that function. This is an alternative fix. Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> (cherry picked from commit 0f9519b938d78ac55e8e5fdad5727a79baf18d42)