summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-21i965: Set up a second "fake" miptree for aux CCS_Eimage_ccs_allocBen Widawsky1-10/+39
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965: Add a helper function for image creationBen Widawsky4-19/+43
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965: Keep track of where the aux buffer isBen Widawsky2-0/+8
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965: Round up the image size for compressedBen Widawsky1-3/+28
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965: Split out image allocation (for ccs)Ben Widawsky1-0/+30
This is a preparatory patch. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965: Bring back always Y-tiled on SKL+Ben Widawsky3-5/+22
commit 6a0d036483caf87d43ebe2edd1905873446c9589 Author: Ben Widawsky <ben@bwidawsk.net> Date: Thu Apr 21 20:14:58 2016 -0700 i965: Always use Y-tiled buffers on SKL+ v2: Store tile_y in image Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2016-10-21gbm: Get tiling properties from DRIBen Widawsky5-0/+72
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21dri: Add vendor and tiling attributesBen Widawsky2-2/+16
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21i965/dri: Store the screen associated with the imageBen Widawsky2-6/+11
I intend to need to get to the devinfo structure, and storing the screen is an easy way to do that. It seems to be the consensus that you cannot share an image between multiple screens. Scape-goat: Rob Clark <robdclark@gmail.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21gbm: Move getters to match order in header fileBen Widawsky1-11/+11
Other things are out of order, but I need to add a getter so I'm just fixing those. This helps people adding to GBM know where the right place to put things is. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-21radeonsi: fix a regression in si_eliminate_const_outputNicolai Hähnle1-4/+3
A constant value of float type is not necessarily a ConstantFP: it could also be a constant expression that for some reason hasn't been folded. This fixes a regression in GL45-CTS.arrays_of_arrays_gl.InteractionFunctionCalls2 that was introduced by commit 3ec9975555d1cc5365413ad9062f412904f944a3. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-21nv50,nvc0: don't keep track of whether fb rt0 is integer-onlyIlia Mirkin6-44/+22
This reverts commits 1af0641db345209c076e9b1ba4dca7524541671a and a6ad49cbbd599aec054d0a3163fff5ad724f2b18. st/mesa adjusts the rasterizer state for us now. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-20Revert "Revert "mapi: export all GLES 3.2 functions in libGLESv2.so""Francisco Jerez1-0/+12
This reverts commit 85e9bbc14d93fa7166c9ae075ee7ae29a8313e3f. The previous commit should help with the scons build failure caused by the original commit. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-10-20glapi: Move PrimitiveBoundingBox and BlendBarrier definitions into ES3.2 ↵Francisco Jerez1-13/+17
category. These two GLES 3.2 entry points were being defined in the category of the ARB_ES3_2_compatibility and KHR_blend_equation_advanced extensions respectively instead of in the ES3.2 category. Defining them in the ES3.2 category makes sure that the gl_procs.py generator emits declarations in the glprocs.h header file for the unsuffixed GLES-only entry points that PrimitiveBoundingBoxARB and BlendBarrierKHR respectively alias. This should avoid a compilation failure during scons builds in combination with "mapi: export all GLES 3.2 functions in libGLESv2.so". Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-10-20util: Include string.h in bitscan.h.Vinson Lee1-0/+1
Fix build error with clang. Compiling src/compiler/glsl/link_varyings.cpp ... In file included from src/compiler/glsl/link_varyings.cpp:33: In file included from src/compiler/glsl/glsl_symbol_table.h:34: In file included from src/compiler/glsl/ir.h:33: In file included from src/compiler/glsl_types.h:29: /usr/include/string.h:518:12: error: exception specification in declaration does not match previous declaration extern int ffs (int __i) __THROW __attribute__ ((__const__)); ^ src/util/bitscan.h:51:13: note: expanded from macro 'ffs' ^ src/util/bitscan.h:96:18: note: previous declaration is here const int i = ffs(*mask) - 1; ^ src/util/bitscan.h:51:13: note: expanded from macro 'ffs' ^ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97952 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-20nvc0: do not break 3D state by pushing MS coordinates on FermiSamuel Pitoiset1-43/+44
Long story short, 3D and CP are aliased on Fermi and initializing compute after pushing the MS sample coordinate offsets seems to corrupt 3D state for weird reasons. I still don't have the faintest clue what is going on, but this seems to only affect Fermi generation. A possible fix could be to use two different channels, one for 3D and one for CP. This fixes a bunch of regressions pinpointed by piglit. Fixes: "nvc0: fix up image support for allowing multiple samples" Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-20nvc0: translate compute shaders at program creationSamuel Pitoiset1-0/+4
This makes shader-db reports results for compute shaders. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-20i965: Reorder PCI ID list to match release orderBen Widawsky1-9/+9
I have some OCD... Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-10-20i965: Add some APL and KBL SKU stringsBen Widawsky1-4/+4
We got a couple for products that exist on ark.intel.com, so let's just put them in now. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-20vbo: clean up with 'indent', whitespace fixes, etc in vbo_exec_array.cBrian Paul1-252/+276
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: whitespace fixes and reformatting in vbo_exec_api.cBrian Paul1-42/+64
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: minor clean-up in vbo_exec_api.cBrian Paul1-5/+2
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: move attribute type assignmentBrian Paul1-1/+2
If the attribute type is changing, we would have found that earlier in the ATTR_UNION() macro and would have called vbo_exec_fixup_vertex(). So move the assignment into that function so we don't do it every time. No Piglit regressions. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: rename reset_attrfv() to vbo_reset_all_attr()Brian Paul1-4/+6
Use a better name. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: make vbo_reset_attr() staticBrian Paul2-3/+5
Not called from any other file. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-10-20vbo: trivial indentation fix in vbo_exec_api.cBrian Paul1-1/+1
2016-10-20gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.hMarek Olšák1-1/+5
Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
2016-10-20radeonsi: fix build of si_eliminate_const_vs_outputs on LLVM <= 3.8Marek Olšák1-3/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-20gallivm: add wrappers for missing functions in LLVM <= 3.8Marek Olšák2-0/+27
radeonsi needs these. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-20radeonsi: fix 64-bit loads from LDSNicolai Hähnle1-1/+1
Fixes spec/arb_tessellation_shader/execution/dvec[23]-vs-tcs-tes, among others. Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-10-20st/mesa: only set primitive_restart when the restart index is in rangeNicolai Hähnle1-2/+13
Even when enabled, primitive restart has no effect when the restart index is larger than the representable values in the index buffer. Fixes GL45-CTS.gtf31.GL3Tests.primitive_restart.primitive_restart_upconvert for radeonsi VI. v2: add an explanatory comment Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
2016-10-20st/glsl_to_tgsi: sort input and output decls by TGSI indexNicolai Hähnle1-0/+28
Fixes a regression introduced by commit 777dcf81b. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98307 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org>
2016-10-20st/glsl_to_tgsi: fix block copies of arrays of structsNicolai Hähnle1-2/+4
Use a full writemask in this case. This is relevant e.g. when a function has an inout argument which is an array of structs. v2: use C-style comment (Timothy Arceri) Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Cc: 13.0 <mesa-stable@lists.freedesktop.org>
2016-10-20st/glsl_to_tgsi: fix block copies of arrays of doublesNicolai Hähnle1-0/+1
Set the type of the left-hand side to the same as the right-hand side, so that when the base type is double, the writemask of the MOV instruction is properly fixed up. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: 13.0 <mesa-stable@lists.freedesktop.org>
2016-10-20glsl: Indirect array indexing on non-last SSBO member must fail compilationIago Toral Quiroga2-7/+15
After the changes in comit 5b2675093e863a52, we moved this check to the linker, but the spec expects this to be checked at compile-time. There are dEQP tests that expect an error at compile time and the spec seems to confirm that expectation: "Except for the last declared member of a shader storage block (section 4.3.9 “Interface Blocks”), the size of an array must be declared (explicitly sized) before it is indexed with anything other than an integral constant expression. The size of any array must be declared before passing it as an argument to a function. Violation of any of these rules result in compile-time errors. It is legal to declare an array without a size (unsized) and then later redeclare the same name as an array of the same type and specify a size, or index it only with integral constant expressions (implicitly sized)." Commit 5b2675093e863a52 tries to take care of the case where we have implicitly sized arrays in SSBOs and it does so by checking the max_array_access field in ir_variable during linking. In this patch we change the approach: we look for indirect access on SSBO arrays, and when we find one, we emit a compile-time error if the accessed member is not the last in the SSBO definition. There is a corner case that the specs do not address directly though and that dEQP checks for: the case of an unsized array in an SSBO definition that is not defined last but is never used in the shader code either. The following dEQP tests expect a compile-time error in this scenario: dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader However, since the unsized array is never used it is never indexed with a non-constant expression, so by the spec quotation above, it should be valid and the tests are probably incorrect. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-19nv50/ir: process texture offset sources as regular sourcesIlia Mirkin1-53/+94
With ARB_gpu_shader5, texture offsets can be any source, including TEMPs and IN's. Make sure to process them as regular sources so that we pick up masks, etc. This should fix some CTS tests that feed offsets directly to textureGatherOffset, and we were not picking up the input use, thus not advertising it in the shader header. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Dave Airlie <airlied@redhat.com> Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
2016-10-19nv50,nvc0: avoid reading out of bounds when getting bogus so infoIlia Mirkin2-2/+8
The state tracker tries to attach the info to the wrong shader. This is easy enough to protect against. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: 12.0 13.0 <mesa-stable@lists.freedesktop.org>
2016-10-20wsi/wayland: fix error pathEric Engestrom1-0/+4
Fixes: 1720bbd353d87412754f ("anv/wsi: split image alloc/free out to separate fns.") Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-20anv: drop unused zero macro.Dave Airlie1-2/+0
I can't see this being used anywhere. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-20radv: use emit_icmp for samples_identicalDave Airlie1-1/+1
On a debug llvm build we'd assert on the next compare when the return from samples_identical was i1 instead of i32. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-19i965/cs: Don't use a thread channel ID for small local sizesJordan Justen1-2/+11
When the local group size is 8 or less, we will execute the program at most 1 time. Therefore, the local channel ID will always be 0. By using a constant 0 in this case we can prevent using push constant data. This is not expected to be common a occurance in real applications, but it has been seen in tests. We could extend this optimization to 16 and 32 for SIMD16 and SIMD32, but it gets a bit more complicated, because this optimization is currently being done early on, before we have decided the SIMD size. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-10-19i965/cs: Use udiv/umod for local IDsJordan Justen1-1/+1
This allows for more optimizations relating to power-of-two divisions. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-10-20mesa: remove unused LocalSizeVariableTimothy Arceri2-6/+0
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-19nvc0/ir: simplify predicate logic for GK104 atomic operationsSamuel Pitoiset1-14/+7
The predicate is always CC_NOT_P as defined in processSurfaceCoordsNVE4(), so we only want to emit OR. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-19nvc0/ir: remove useless NVC0LoweringPass::gMemBaseSamuel Pitoiset1-4/+1
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-19nv50/ir: print CCTL subops in debug modeSamuel Pitoiset1-0/+9
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-19nir: Optimize integer division and modulus with 1Ian Romanick1-0/+4
The previous power-of-two rules didn't catch idiv (because i965 doesn't set lower_idiv) and imod cases. The udiv and umod cases should have been caught, but I included them for orthogonality. This fixes silly code observed from compute shaders with local_size_[xy] = 1. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98299 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-19configure.ac: enable EGL platform DRM if GBM is enabledMarek Olšák1-2/+6
since GBM is enabled by default, this is also enabled by default the whitespace changes remove tabs Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-19configure.ac: enable GBM by defaultMarek Olšák1-10/+9
Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-19configure.ac: print whether GBM is enabledMarek Olšák1-0/+5
Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>