summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-11vc4: Add support for texel fetches from MSAA resources.Eric Anholt5-15/+295
This is the core of ARB_texture_multisample. Most of the piglit tests for GL_ARB_texture_multisample require GL 3.0, but exposing support for this lets us use the gallium blitter for multisample resolves. We can sometimes multisample resolve using just the RCL, but that requires that the blit is 1:1, unflipped, and aligned to tile boundaries. (cherry picked from commit 6b4dfd53ae9b4f86cda0377a4d67b79e9faf7cc8)
2015-12-11vc4: Add support for multisample framebuffer operations.Eric Anholt7-24/+191
This includes GL_SAMPLE_COVERAGE, GL_SAMPLE_ALPHA_TO_ONE, and GL_SAMPLE_ALPHA_TO_COVAGE. I haven't implemented a dithering function yet, and gallium doesn't give me a good chance to do so for GL_SAMPLE_COVERAGE. (cherry picked from commit a97b40dca4949b5b8b3320e76768e54f430c9e78)
2015-12-11vc4: Add a workaround for HW-2905, and additional failure I saw with MSAA.Eric Anholt1-2/+16
I only stumbled on this while experimenting due to reading about HW-2905. I don't know if the EZ disable in the Z-clear is actually necessary, but go with it for now. (cherry picked from commit edc3305de7d749338ad88a949cedfc290a796fe5)
2015-12-11vc4: Add support for drawing in MSAA.Eric Anholt6-50/+148
(cherry picked from commit edfd4d853a0d26bc0cde811de7b20116db7e66fc)
2015-12-11vc4: Add kernel RCL support for MSAA rendering.Eric Anholt5-39/+239
(cherry picked from commit e7c8ad0a6c8ba263f29b7c3c5120bc6beabeba7b)
2015-12-11vc4: Rename color_ms_write to color_write.Eric Anholt3-22/+21
I was thinking this was the only MSAA resolve thing, so it should be noted separately, but actually load/store general also do MSAA resolve. (cherry picked from commit 568d3a8e32109200cc12549d18118b7660be628b)
2015-12-11vc4: Allow RCL blits to the edge of the surface.Eric Anholt1-2/+8
The recent unaligned fix successfully prevented RCL blits that weren't aligned inside of the surface, but we also want to be able to do RCL blits for the whole surface when the width or height of the surface aren't aligned (we don't care what renders inside of the padding). (cherry picked from commit bf92017ace970104b24219fad0ce5b51bc4509b5)
2015-12-11vc4: Fix check for tile RCL blits with mismatched y.Eric Anholt1-1/+1
This was a typo in 3a508a0d94d020d9cd95f8882e9393d83ffac377 that didn't show up in testcases at that moment. (cherry picked from commit 2792d118f17f92b1908e3f0fc735087bb7ea4c38)
2015-12-11vc4: Fix compiler warning from size_t change.Eric Anholt1-1/+1
I missed this when bringing over the kernel changes. (cherry picked from commit 1529f138fff59bdb857d5f7da0ee2537521d5044)
2015-12-11vc4: Fix accidental scissoring when scissor is disabled.Eric Anholt1-5/+23
Even if the rasterizer has scissor disabled, we'll have whatever vc4->scissor bounds were last set when someone set up a scissor, so we shouldn't clip to them in that case. Fixes piglit fbo-blit-rect, and a lot of MSAA tests once they're enabled. (cherry picked from commit a4eff86f4afb6618aff488e9da5600e33d97a9c3)
2015-12-11vc4: Disable RCL blitting when scissors are enabled.Eric Anholt1-0/+3
We could potentially handle scissored blits when they're tile aligned, but it doesn't seem worth it. If you're doing a scissored blit, you're probably a testcase. Fixes piglit's fbo-scissor-blit fbo (cherry picked from commit d16d666776ee12659145f08bd35566dd2cc0f925)
2015-12-11vc4: Bring over cleanups from submitting to the kernel.Eric Anholt4-87/+78
(cherry picked from commit 0afe83078d10e0d376f7c3e2515ab2682fec0eb1)
2015-12-11vc4: Add debug dumping of MSAA surfaces.Eric Anholt2-6/+145
(cherry picked from commit a69ac4e89c1c3edc33eb4e9361229a3f25de3ee6)
2015-12-11vc4: Add support for laying out MSAA resources.Eric Anholt1-5/+20
For MSAA, we store full resolution tile buffer contents, which have their own tiling format. Since they're full resolution buffers, we have to align their size to full tiles. (cherry picked from commit 3c3b1184eb57951c8a40258c9214a1aece1602e6)
2015-12-11vc4: Add support for storing sample mask.Eric Anholt5-0/+24
From the API perspective, writing 1 bits can't turn on pixels that were off, so we AND it with the sample mask from the payload. (cherry picked from commit 74c4b3b80cc4246fd1eb503d97edb3d293eef5de)
2015-12-11vc4: Fix up tile alignment checks for blitting using just an RCL.Eric Anholt1-6/+22
We were checking that the blit started at 0 and was 1:1, but not that it went to the full width of the surface, or that the width was aligned to a tile. We then told it to blit to the full width/height of the surface, causing contents to be stomped in a bunch of MSAA tests that happen to include half-screen-width blits to 0,0. (cherry picked from commit 3a508a0d94d020d9cd95f8882e9393d83ffac377)
2015-12-11vc4: Add support for loading sample mask.Eric Anholt6-1/+19
(cherry picked from commit a664233042e1ad343184a0c237c3bd7ac5010779)
2015-12-11vc4: Use nir_channel() to simplify all of our nir_swizzle() cases.Eric Anholt2-6/+5
(cherry picked from commit 4cff16bc3a84569da05e672c8226931678aa62c0)
2015-12-11vc4: Fix point size lookup.Eric Anholt1-1/+1
I think I may have regressed this in the NIR conversion. TGSI-to-NIR is putting the PSIZ in the .x channel, not .w, so we were grabbing some garbage for point size, which ended up meaning just not drawing points. Fixes glean pointAtten and pointsprite. (cherry picked from commit 81544f231ad6eba1c7eb8b89273c59eb53a25879)
2015-12-07Update version to 11.1.0-rc3Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-12-04radeon/llvm: Use llvm.AMDIL.exp intrinsic again for nowMichel Dänzer1-1/+1
llvm.exp2.f32 doesn't work in some cases yet. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92709 Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit d09463193608009fa42e046b1fc144435d3533f6)
2015-12-04i965: fix 64-bit immediates in brw_inst(_set)_bitsConnor Abbott1-2/+2
If we tried to get/set something that was exactly 64 bits, we would try to do (1 << 64) - 1 to calculate the mask which doesn't give us all 1's like we want. v2 (Iago) - Replace ~0 by ~0ull - Removed unnecessary parenthesis v3 (Kristian) - Avoid the conditional Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> (cherry picked from commit b1a83b5d1b677faf650a41cd2c152b4d1cd18f84) Squashed with commit i965: Use ull immediates in brw_inst_bits This fixes a regression introduced in b1a83b5d1 that caused basically all shaders to fail to compile on 32-bit platforms. Reported-by: Mark Janes <mark.a.janes@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 9d703de85a7bdd6ae767aedd7690cb82794cb90a) Nominated-by: Ian Romanick <ian.d.romanick@intel.com>
2015-12-04mesa: rework the meaning of gl_debug_message::lengthEmil Velikov1-16/+24
Currently it stores strlen(buf) whenever the user originally provided a negative value for length. Although I've not seen any explicit text in the spec, CTS requires that the very same length (be that negative value or not) is returned back on Pop. So let's push down the length < 0 checks, tweak the meaning of gl_debug_message::length and fix GetDebugMessageLog to add and count the null terminators, as required by the spec. v2: return correct total length in GetDebugMessageLog v3: rebase (drop _mesa_shader_debug hunk). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 5a23f6bd8d8d26e0e75801df44cc228f15f9768e)
2015-12-04mesa: errors: validate the length of null terminated stringEmil Velikov1-3/+17
We're about to rework the meaning of gl_debug_message::length to only store the user provided data. Thus we should add an explicit validation for null terminated strings. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 622186fbdf47e4c77aadba3e38567636ecbcccf5)
2015-12-04mesa: accept TYPE_PUSH/POP_GROUP with glDebugMessageInsertEmil Velikov1-1/+1
These new (relative to ARB_debug_output) tokens, have been explicitly separated from the existing ones in the spec text. With the reference to glDebugMessageInsert was dropped. At the same time, further down the spec says: "The value of <type> must be one of the values from Table 5.4" ... and these two are listed in Table 5.4. The GL 4.3 and GLES 3.2 do not give any hints on the former 'definition', plus CTS requires that the tokens are valid values for glDebugMessageInsert. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 66fea8bd9662c8fc62d87cafce89adc27e3172a2)
2015-12-04mesa: add SEVERITY_NOTIFICATION to default stateEmil Velikov1-2/+3
As per the spec quote: "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW" We already had MEDIUM and HIGH set, let's toggle NOTIFICATION as well. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 53be28107b44200a59c678c5d2234efeb48d0b35)
2015-12-04mesa: return the correct value for GroupStackDepthEmil Velikov1-1/+1
We already have one group (the default) as specified in the spec. So lets return its size, rather than the index of the current group. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 078dd6a0b4135b5181eea538473fe53a9bc61223)
2015-12-04mesa: rename GroupStackDepth to CurrentGroupEmil Velikov1-16/+16
The variable is used as the actual index, rather than the size of the group stack - rename it to reflect that. Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit f39954bf7cf09199a1cccb71e0e858c0b2054c6d)
2015-12-04mesa: do not enable KHR_debug for ES 1.0Emil Velikov2-11/+11
The extension requires (cough implements) GetPointervKHR (alias of GetPointerv) which in itself is available for ES 1.1 enabled mesa. Anyone willing to fish around and implement it for ES 1.0 is more than welcome to revert this commit. Until then lets restrict things. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 1ca735701bb4d66c95d2ab64c0d838608f7c3f96)
2015-12-04glapi: add GetPointervKHR to the ES dispatchEmil Velikov2-1/+9
The KHR_debug extension implements this. Strictly speaking it could be used with ES 1.0, although as the original function is available on ES 1.1, I'm inclined to lift the KHR_debug requirement to ES 1.1. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit f53f9eb8d495a318bc8e6fd758df4ba4074599ef) Squashed with commit mesa/tests: add KHR_debug GLES glGetPointervKHR entry points Should have been part of commit f53f9eb8d49 "glapi: add GetPointervKHR to the ES dispatch". v2: comment out the ES1.1 symbol and use the same description (pattern) as elsewhere (Matt) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93235 Fixes: f53f9eb8d49 "glapi: add GetPointervKHR to the ES dispatch". Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Vinson Lee <vlee@freedesktop.org> (v1) Tested-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 1074e38fbbc89a06c74f036622cbe2778bee993a)
2015-12-04mesa: remove len argument from _mesa_shader_debug()Emil Velikov5-10/+9
There was only a single user which was using strlen(buf). As this function is not user facing (i.e. we don't need to feed back original length via a callback), we can simplify things. Suggested-by: Timothy Arceri <timothy.arceri@collabora.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit d37ebed470c6c37abfc6fe42079bff027ff58e9d)
2015-12-04nv50/ir: avoid looking at uninitialized srcMods entriesIlia Mirkin2-2/+2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2b98914fe01f1c7b2de8a096c8923b3ab0a69578)
2015-12-04nv50/ir: fix DCE to not generate 96-bit loadsIlia Mirkin1-1/+31
A situation where there's a 128-bit load where the last component gets DCE'd causes a 96-bit load to be generated, which no GPU can actually emit. Avoid generating such instructions by scaling back to 64-bit on the first load when splitting. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 49692f86a1b77fac4634d2a3f0502ec7451c3435)
2015-12-04radeonsi: fix Fiji for LLVM <= 3.7Marek Olšák1-1/+2
Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit dd27825c8cf0e7b55ebaa139e299f275943d22f6)
2015-12-04mesa/version: Update gl_extensions::Version during version overrideNanley Chery1-0/+1
Commit a16ffb743ced9fde80b2485dfc2d86ae74e86f25, which introduced gl_extensions::Version, updates the field when the context version is computed and when entering/exiting meta. Update this field when the version is overridden as well. Cc: "11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> (cherry picked from commit 808e75279618d887daeee8ab2025e39c863234ac)
2015-12-04i965: use _Shader to get fragment program when updating surface stateTapani Pälli1-2/+2
Atomic counters and Images were using ctx::Shader that does not take in to account program pipeline changes, ctx::_Shader must be used for SSO to work. Commit c0347705 already changed ubo's to use this. Fixes failures seen with following Piglit test: arb_separate_shader_object-atomic-counter Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 231db5869c2c0f32608f39100bffff569da21bea)
2015-12-04nv50/ir: don't forget to mark flagsDef on cvt in txb loweringIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 101e315cc167b0b00319aa70f64c49470e2525f8)
2015-12-04nv50/ir: fix instruction permutation logicIlia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 06055121e6386bc74e4558a86ef690eae9556482)
2015-12-04nv50/ir: the mad source might not have a defining instructionIlia Mirkin1-1/+1
For example if it's $r63 (aka 0), there won't be a definition. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 11fcf46590129abfa2ca2117a320e8a8052761e4)
2015-12-04nv50/ir: deal with loops with no breaksIlia Mirkin1-0/+6
For example if there are only returns, the break bb will not end up part of the CFG. However there will have been a prebreak already emitted for it, and when hitting the RET that comes after, we will try to insert the current (i.e. break) BB into the graph even though it will be unreachable. This makes the SSA code sad. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit adcc547bfbef362067bb3b4e3aee75b287bc6189)
2015-12-04nvc0/ir: fold postfactor into immediateIlia Mirkin1-0/+6
SM20-SM50 can't emit a post-factor in the presence of a long immediate. Make sure to fold it in. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ff61ac48387d3f42ede50a572c11f404f4cd3abb)
2015-12-04mesa: fix VIEWPORT_INDEX_PROVOKING_VERTEX and LAYER_PROVOKING_VERTEX queriesRoland Scheidegger3-2/+8
These are implementation-dependent queries, but so far we just returned the value of whatever the current provoking vertex convention was set to, which was clearly wrong. Just make this a variable in the context constants like for other things which are implementation dependent (I assume all drivers will want to set this to the same value for both queries), and set it to GL_UNDEFINED_VERTEX which is correct for everybody (and drivers can override it). Reviewed-by: Brian Paul <brianp@vmware.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 09f74e6ef45859a3b595e2932e2be3e7d7ab6ca0)
2015-12-04r600: SMX returns CONTEXT_DONE early workaroundDave Airlie2-1/+13
streamout, gs rings bug on certain r600s, requires a wait idle before each surface sync. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit af4013d26b3203a794ae34fe0c98139bc1058273)
2015-12-04r600: do SQ flush ES ring rolling workaroundDave Airlie3-1/+8
Need to insert a SQ_NON_EVENT when ever geometry shaders are enabled. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit b63944e8b9177d231b3789bf84ea9e67b9629905)
2015-12-04clover: Handle NULL devices returned by pipe_loader_probe() v2Tom Stellard1-1/+2
When probing for devices, clover will call pipe_loader_probe() twice. The first time to retrieve the number of devices, and then second time to retrieve the device structures. We currently assume that the return value of both calls will be the same, but this will not be the case if a device happens to disappear between the two calls. When a device disappears, the pipe_loader_probe() will add a NULL device to the device list, so we need to handle this. v2: - Keep range for loop Reviewed-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9adbb9e7134fdc40766710592e81cbc9c09c7aaa)
2015-12-04automake: fix some occurrences of hardcoded -ldl and -lpthreadJonathan Gray2-2/+3
Correct some occurrences of -ldl and -lpthread to use $(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (cherry picked from commit 99cd60083518ad4465e3e29996168e8fa8a89fbb)
2015-12-04r600: workaround empty geom shader.Dave Airlie1-0/+5
We need to emit at least one cut/emit in every geometry shader, the easiest workaround it to stick a single CUT at the top of each geom shader. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 4f347225752b48f3dc5a59a6be71fe78616252a7)
2015-12-04r600: rv670 use at least 16es/gs threadsDave Airlie1-4/+5
This is specified in the docs for rv670 to work properly. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 04efcc6c7adfda75b425f443588f0faab453ba3a)
2015-12-04r600: geometry shader gsvs itemsize workaroundDave Airlie1-0/+20
On some chips the GSVS itemsize needs to be aligned to a cacheline size. This only applies to some of the r600 family chips. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 8168dfdd4e63457bd8a9ef04a5d49a1f2e202ab8)
2015-12-04cherry-ignore: ignore unneeded header updateEmil Velikov1-0/+2
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>