summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-11Add missing platform information for KBLjenkinsMark Janes1-0/+5
In testing KBL, I found: - urb size was not set for slices gt1.5, gt2, and gt3. The value I used for these slices (384) was taken from an earlier patch authored by Ben Widawsky. - slice count was missing. This field was added by a403ad4f5a034e52a3cd845e91c4aa3e6927b731 With this commit, KBL passes piglit at parity with SKL. Note: As requested by Kristian, Sarah modified this patch to drop setting urb size for gt1.5, gt2, and gt3, since the correct default is set in the GEN9 macro by commit c1e38ad37042b0ec261eb0ba5631b7ff0ee7a9da "i965/skl: Use larger URB size where available." Signed-off-by: Mark Janes <mark.a.janes@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Cc: "11.1" <mesa-stable@lists.freedesktop.org>
2016-01-11mesa/uniform_query: add IROUNDD and use for doubles->ints (v2)Dave Airlie2-1/+8
For the case where we convert a double to an int, we should round the same as we do for floats. This fixes GL41-CTS.gpu_shader_fp64.state_query v2: add IROUNDD (Ilia) Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-11glsl: replace unreachable code path with assertTimothy Arceri1-5/+4
The lower_named_interface_blocks() pass is called before we try assign locations to varyings so this shouldn't be reachable. Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-11Revert "glsl: replace unreachable code path with assert"Timothy Arceri1-4/+5
This reverts commit 98270fd20d4d58db8ae5af3b6f10ed6a81c058a6. Something went terribly wrong the commit is not what the commit message says.
2016-01-11glsl: replace unreachable code path with assertTimothy Arceri1-5/+4
The lower_named_interface_blocks() pass is called before we try assign locations to varyings so this shouldn't be reachable. Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-11glsl: combine if blocksTimothy Arceri1-6/+3
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-11mesa: Update todo regarding StencilOp and StencilOpSeparate.Rhys Kidd1-12/+6
OpenGL 2.0 function StencilOp() is in part internally implemented via StencilOpSeparate(). This change happened some time ago, however the accompanying doxygen todo comment was not accordingly updated. Replace the outdated portion of this doxygen todo comment, leaving the remainder unchanged. Also better respect the 80 character suggested line length in this file. v2: Fully remove comment, following code review by t_arceri@yahoo.com.au Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Thomas Helland <thomashelland90@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-01-09glsl: Make bitfield_insert/extract and bfi/bfm non-vectorizable.Kenneth Graunke1-1/+6
Currently, opt_vectorize() tries to combine: result.x = bitfieldInsert(src0.x, src1.x, src2.x, src3.x); result.y = bitfieldInsert(src0.y, src1.y, src2.y, src3.y); result.z = bitfieldInsert(src0.z, src1.z, src2.z, src3.z); result.w = bitfieldInsert(src0.w, src1.w, src2.w, src3.w); into a single ir_quadop_bitfield_insert opcode, which operates on ivec4s. However, GLSL IR's opcodes currently require the bits and offset parameters to be scalar integers. So, this breaks. We want to be able to vectorize this eventually, but for now, just chicken out and make opt_vectorize() bail by marking all the bitfield insert/extract related opcodes as horizontal. This is a relatively uncommon case today, so we'll do the simple fix for stable branches, and fix it properly on master. Fixes assertion failures when compiling Shadow of Mordor vertex shaders on i965 in vec4 mode (where OptimizeForAOS enables opt_vectorize()). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org
2016-01-09nv50/ir: Fix scratch allocation size and filePierre Moreau2-3/+3
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-08mesa: merge bind_atomic_buffers_{base|range}Nicolai Hähnle1-106/+49
Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-08mesa: merge bind_shader_storage_buffers_{base|range}Nicolai Hähnle1-111/+51
Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-08mesa: merge bind_uniform_buffers_{base|range}Nicolai Hähnle1-108/+50
Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-08mesa: merge bind_xfb_buffers_{base|range}Nicolai Hähnle1-113/+59
Reduced code duplication should make the code more maintainable. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-08glsl: Don't add nir files to libglsl_la_SOURCESKristian Høgsberg Kristensen3-4/+8
SCons doesn't understand nir yet and doesn't want to compile the glsl to nir pass. Move the files to their own variable so we can add it only for automake. Tested-by: Brian Paul <brianp@vmware.com>
2016-01-08nv50,nvc0: use a face sysval to avoid the useless back-and-forth conversionIlia Mirkin5-9/+2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-08glsl: Move _mesa_shader_stage_to_string/abbrev to shader_enums.cKristian Høgsberg Kristensen8-52/+56
These are used by code that doesn't necessarily link to libglsl.la. Move them to shader_enums.[ch] where we keep similar helpers. Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-01-08i965: Move GLSL lowering passes out of libi965_compiler.laKristian Høgsberg Kristensen1-5/+5
The scope of libi965_compiler.la is to be able to take nir shaders and generate i965 EU code. As such, we don't want the GLSL IR lowering passes in the library. With this change, libi965_compiler.la no longer needs to link to libglsl.la. Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-01-08glsl: Move glsl_to_nir files to LIBGLSL_FILESKristian Høgsberg Kristensen1-2/+2
libglsl_la_SOURCES includes both NIR_FILES and LIBGLSL_FILES, so for libglsl.la consumers, this is a no-op. libnir.la however no longer uses any GLSL IR infrastructure and can be used without also linking to libglsl.la. Acked-by: Matt Turner <mattst88@gmail.com>
2016-01-08mesa: Use separate indices for UBO & SSBO during bindingJordan Justen1-10/+20
Previously we were treating the binding index for Uniform Buffer Objects and Shader Storage Buffer Objects as being part of the combined BufferInterfaceBlocks array. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93322 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-01-08mesa: Map program UBOs and SSBOs to Interface BlocksJordan Justen3-5/+37
v2: * Fill UboInterfaceBlockIndex and SsboInterfaceBlockIndex in split_ubos_and_ssbos (Iago) Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-01-08mesa: docs: Add link to planet.freedesktop.orgSarah Sharp1-0/+1
The freedesktop.org blog feeds aren't mentioned on either mesa3d.org or any of the graphics project wikis (including the DRI wiki) on freedeskop.org. Fix that by linking to it from the sidebar. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-08freedreno: add ir3_compiler to gitignoreIlia Mirkin1-0/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-08gallium: add a RESQ opcode to query info about a resourceIlia Mirkin3-1/+14
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08gallium: add PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENTIlia Mirkin16-13/+32
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08gallium: add PIPE_SHADER_CAP_MAX_SHADER_BUFFERSIlia Mirkin13-0/+23
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08tgsi: update atomic op docsIlia Mirkin1-46/+47
Specify that the operation only applies to the x component, not per-component as previously specified. This is unnecessary for GL and creates additional complications for images which need to support these operations as well. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08tgsi: add a is_store propertyIlia Mirkin2-223/+224
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08tgsi: provide a way to encode memory qualifiers for SSBOIlia Mirkin10-2/+180
Each load/store on most hardware can specify what caching to do. Since SSBO allows individual variables to also have separate caching modes, allow loads/stores to have the qualifiers instead of attempting to encode them in declarations. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08ureg: add buffer support to uregIlia Mirkin6-1/+69
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08tgsi: add ureg support for image declsIlia Mirkin12-52/+153
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-08glsl: Ensure 64bits shift is used.Jose Fonseca1-3/+3
I believe that `1u << x`, where x >= 32 yields undefined results according to the C standard. Particularly MSVC says `warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)`. Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08mesa/main: Avoid `void function returning a value` warning.Jose Fonseca1-2/+4
Trivial. Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08configure.ac: add --enable-profileOded Gabbay1-0/+21
For profiling mesa's code, especially llvmpipe, PROFILE should be defined. Currently, this define can only be generated if mesa is built using scons. This patch makes it possible to generate this define also when building mesa through automake tools. v2: - Change --enable-llvmpipe-profile to --enable-profile - Add -fno-omit-frame-pointer to CFLAGS and CXXFLAGS when enabling profile Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-08nine: allow fragment shader POSITION and FACE to be system valuesMarek Olšák2-12/+46
Reported-by: Axel Davy <axel.davy@ens.fr>
2016-01-08vl: allow fragment shader POSITION to be a system valueMarek Olšák1-4/+8
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08util/pstipple: allow fragment shader POSITION to be a system valueMarek Olšák6-11/+34
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08st/mesa: add support for POSITION and FACE system valuesMarek Olšák4-16/+44
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08tgsi/scan: update for POSITION and FACE sytem valuesMarek Olšák1-1/+4
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08gallium: add caps for POSITION and FACE system valuesMarek Olšák17-6/+48
v2: document the integer behavior Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08program: add a helper for rewriting FP position input to sysvalMarek Olšák2-0/+29
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08glsl: optionally declare gl_FragCoord & gl_FrontFacing as system valuesMarek Olšák5-4/+18
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com Reviewed-by: Brian Paul <brianp@vmware.com>
2016-01-08tgsi/ureg: handle redundant declarations in ureg_DECL_system_valueMarek Olšák1-1/+9
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-08tgsi/ureg: remove index parameter from ureg_DECL_system_valueMarek Olšák4-13/+16
It can be trivially derived from the number of already declared system values. This allows ureg users not to worry about which index to choose. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-08st/mesa: remove dead code from mesa_to_tgsiMarek Olšák1-51/+0
These aren't part of ARB_fragment_program. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-08radeon, si: Use TGSI chan name defines in lp_build_emit_fetch() callsEdward O'Callaghan2-8/+8
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-01-08gallium/aux: Use TGSI chan name defines inplace of literalsEdward O'Callaghan1-6/+7
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-01-08mesa: check that internalformat of CopyTexImage*D is not 1, 2, 3, 4Nicolai Hähnle1-0/+16
The piglit copyteximage check has recently been augmented to test this, but apparently it hasn't been fixed in Mesa so far. This language also already appears in the OpenGL 2.1 spec (Ian). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-07i965/compiler: Enable more lowering in NIRJason Ekstrand1-0/+7
We don't need these for GLSL or ARB, but we need them for SPIR-V Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-01-07nir/algebraic: Add more loweringJason Ekstrand2-0/+10
This commit adds lowering options for the following opcodes: - nir_op_fmod - nir_op_bitfield_insert - nir_op_uadd_carry - nir_op_usub_borrow Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-01-07nir/opcodes: Fix up uadd_carry and usub_borrowJason Ekstrand1-2/+2
Both were defined as returning bool but the gpu_shader5 functions are defined to return int. Also, we had the parameters for usub borrwo backwards in the folding expression. Reviewed-by: Matt Turner <mattst88@gmail.com>