summaryrefslogtreecommitdiff
path: root/src/compiler
AgeCommit message (Collapse)AuthorFilesLines
2018-07-03nir: fix selection of loop terminator when two or more have the same limitTimothy Arceri2-4/+4
We need to add loop terminators to the list in the order we come across them otherwise if two or more have the same exit condition we will select that last one rather than the first one even though its unreachable. This fix is for simple unrolls where we only have a single exit point. When unrolling these type of loops the unreachable terminators and their unreachable branch are removed prior to unrolling. Because of the logic change we also switch some list access in the complex unrolling logic to avoid breakage. Fixes: 6772a17acc8e ("nir: Add a loop analysis pass") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 463f849097193ad20e7622ddd740fd15b96f4277)
2018-07-03glsl/cache: save and restore ExternalSamplersUsedMarek Olšák1-0/+2
Shaders that need special code for external samplers were broken if they were loaded from the cache. Cc: 18.1 <mesa-stable@lists.freedesktop.org> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit 99c6cae2278011309b7ca3d4735c7b341cbb4eef)
2018-07-03glsl: skip comparison opt when adding vars of different sizeTimothy Arceri1-0/+6
The spec allows adding scalars with a vector or matrix. In this case the opt was losing swizzle and size information. This fixes a bug with Doom (2016) shaders. Fixes: 34ec1a24d61f ("glsl: Optimize (x + y cmp 0) into (x cmp -y).") Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 2a5121bf355001e2c69ba05e8d9be4ed633c7bf4)
2018-06-26nir/validate: Use the type from the tail of call parameter derefsJason Ekstrand1-2/+4
Otherwise, if what gets passed into the function call is a deref chain longer than just a variable deref, we would use the type of the entire variable rather than the type of the thing being dereferenced. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106980 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (Unique to 18.1)
2018-06-26nir: Handle call instructions in foreach_srcJason Ekstrand1-1/+16
Even though they don't have regular sources, they do have derefs and those may have implied sources that should be handled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106980 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (Unique to 18.1)
2018-06-26glsl: serialize data from glTransformFeedbackVaryingsTapani Pälli1-0/+20
While XFB has been enabled for cache, we did not serialize enough data for the whole API to work (such as glGetProgramiv). Fixes: 6d830940f7 "Allow shader cache usage with transform feedback" Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106907 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit ab2643e4b06f63c93a57624003679903442634a8)
2018-06-21glsl/tests/glcpp: reinstate "error out if no tests found"Emil Velikov1-0/+9
With the recent rework of converting the shell script to a python one the check for actual tests was dropped. Bring that back, since it was explicitly added considering we had a ~2 year period, during which the tests were not run. v2: use raise Exception() over print() & return false (Dylan) Fixes: db8cd8e36771 ("glcpp/tests: Convert shell scripts to a python script") Cc: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit d589eddc8be5240632d42ae1931b0b6a82ff524c)
2018-06-15glsl: Don't copy propagate elements from SSBO or shared variables eitherIan Romanick1-0/+8
Since SSBOs can be written by a different GPU thread, copy propagating a read can cause the value to magically change. SSBO reads are also very expensive, so doing it twice will be slower. The same shader was helped by this patch and the previous. Haswell, Broadwell, and Skylake had similar results. (Skylake shown) total instructions in shared programs: 14399119 -> 14399113 (<.01%) instructions in affected programs: 683 -> 677 (-0.88%) helped: 1 HURT: 0 total cycles in shared programs: 532973113 -> 532971865 (<.01%) cycles in affected programs: 524666 -> 523418 (-0.24%) helped: 1 HURT: 0 Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106774 (cherry picked from commit 37bd9ccd21b860d2b5ffea7e1f472ec83b68b43b)
2018-06-15glsl: Don't copy propagate from SSBO or shared variables eitherIan Romanick1-0/+2
Since SSBOs can be written by other GPU threads, copy propagating a read can cause the value to magically change. SSBO reads are also very expensive, so doing it twice will be slower. Haswell, Broadwell, and Skylake had similar results. (Skylake shown) total instructions in shared programs: 14399120 -> 14399119 (<.01%) instructions in affected programs: 684 -> 683 (-0.15%) helped: 1 HURT: 0 total cycles in shared programs: 532978931 -> 532973113 (<.01%) cycles in affected programs: 530484 -> 524666 (-1.10%) helped: 1 HURT: 0 Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Cc: mesa-stable@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106774 (cherry picked from commit 461a5c899c08064467abb635536381a5a5659280)
2018-06-15glsl: allow standalone semicolons outside main()Dave Airlie1-0/+1
GLSL 4.60 offically added this but games and older CTS suites actually had shaders that did this, we may as well enable it everywhere. Adding stable because it appears apps in the wild do this. Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: <mesa-stable@lists.freedesktop.org> (cherry picked from commit babd1d526be4690204964f5e0a42f5df12f7f83b)
2018-06-04glsl: Add ir_binop_vector_extract in NIRJuan A. Suarez Romero1-0/+9
Implement ir_binop_vector_extract using NIR operations. Based on SPIR-V to NIR approach. This fixes: dEQP-GLES3.functional.shaders.indexing.moredynamic.with_value_from_indexing_expression_fragment Piglit's glsl-fs-vec4-indexing-8.shader_test CC: mesa-stable@lists.freedesktop.org Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Iago Toral <itoral@igalia.com> (cherry picked from commit cbe4baed1f63db697500db069756750afc9e7609)
2018-05-18spirv: fix visiting inner loops with same break/continue blockSamuel Pitoiset1-0/+13
We should stop walking through the CFG when the inner loop's break block ends up as the same block as the outer loop's continue block because we are already going to visit it. This fixes the following assertion which ends up by crashing in RADV or ANV: SPIR-V parsing FAILED: In file ../src/compiler/spirv/vtn_cfg.c:381 block->node.link.next == NULL 0 bytes into the SPIR-V binary This also fixes a crash with a camera shader from SteamVR. v2: make use of vtn_get_branch_type() and add an assertion Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106090 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106504 CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 6bde8c560877512852ff49fafa296eb71a5ec14b)
2018-05-09glsl: change ast_type_qualifier bitset size to work around GCC 5.4 bugBrian Paul1-1/+7
Change the size of the bitset from 128 bits to 96. This works around an apparent GCC 5.4 bug in which bad SSE code is generated, leading to a crash in ast_type_qualifier::validate_in_qualifier() (ast_type.cpp:654). This can be repro'd with the Piglit test tests/spec/glsl-1.50/execution/ varying-struct-basic-gs-fs.shader_test Bugzilla:https://bugs.freedesktop.org/show_bug.cgi?id=105497 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Charmaine Lee <charmainel@vmware.com> Tested-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 901db25d5b7cd2ac2dd648b370c4bddf23dd5c44)
2018-05-03spirv: Apply OriginUpperLeft to FragCoordNeil Roberts1-3/+3
This behaviour was changed in 1e5b09f42f694687ac. The commit message for that says it is just a “tidy up” so my assumption is that the behaviour change was a mistake. It’s a little hard to decipher looking at the diff, but the previous code before that patch was: if (builtin == SpvBuiltInFragCoord || builtin == SpvBuiltInSamplePosition) nir_var->data.origin_upper_left = b->origin_upper_left; if (builtin == SpvBuiltInFragCoord) nir_var->data.pixel_center_integer = b->pixel_center_integer; After the patch the code was: case SpvBuiltInSamplePosition: nir_var->data.origin_upper_left = b->origin_upper_left; /* fallthrough */ case SpvBuiltInFragCoord: nir_var->data.pixel_center_integer = b->pixel_center_integer; break; Before the patch origin_upper_left affected both builtins and pixel_center_integer only affected FragCoord. After the patch origin_upper_left only affects SamplePosition and pixel_center_integer affects both variables. This patch tries to restore the previous behaviour by changing the code to: case SpvBuiltInFragCoord: nir_var->data.pixel_center_integer = b->pixel_center_integer; /* fallthrough */ case SpvBuiltInSamplePosition: nir_var->data.origin_upper_left = b->origin_upper_left; break; This change will be important for ARB_gl_spirv which is meant to support OriginLowerLeft. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Fixes: 1e5b09f42f694687ac "spirv: Tidy some repeated if checks..." (cherry picked from commit e17d0ccbbddac455e4c47f5adc2333a531fedd3e)
2018-04-27compiler/glsl: close fd's in glcpp_test.pyDylan Baker1-2/+4
I would have thought falling out of scope would allow the gc to collect these, but apparently it doesn't, and this hits an fd limit on macos. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106133 Fixes: db8cd8e36771eed98eb638fd0593c978c3da52a9 ("glcpp/tests: Convert shell scripts to a python script") Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Vinson Lee <vlee@freedesktop.org> (cherry picked from commit dbf5b772b3b5f962c3186dd0073146539ec0586b)
2018-04-27nir: Do not use progress for unreachable code in return lowering.Bas Nieuwenhuizen1-1/+6
We seem to use progress for two cases: 1) When we lowered some returns. 2) When we remove unreachable code. If just case 2 happens we assert as state->return_flag has not been allocated yet, but we are still trying to do insert all predicates based on it. This splits the concerns. We only use progress internally for case 1 and then keep track of 2 in a separate variable to indicate progress in the return value of the pass. This is slightly better than transforming the assert into if (!state->return_flag) return, as the solution in this patch avoids inserting predicates even if some other part of the might need them. Fixes: 6e22ad6edc "nir: return early when lowering a return at the end of a function" CC: 18.1 <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106174 Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit 0e945fdf23bac5a62c15edfcbfd9d6ac4eee592f)
2018-04-20autotools: Include new meson filesDylan Baker1-0/+1
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-04-20glsl: prevent spurious Valgrind errors when serializing NIRNicolai Hähnle1-2/+4
It looks as if the structure fields array is fully initialized below, but in fact at least gcc in debug builds will not actually overwrite the unused bits of bit fields. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-19nir: Offset vertex_id by first_vertex instead of base_vertexNeil Roberts1-1/+1
base_vertex will be zero for non-indexed calls and in that case we need vertex_id to be offset by the ‘first’ parameter instead. That is what we get with first_vertex. This is true for both GL and Vulkan. The freedreno driver is also setting vertex_id_zero_based on nir_options. In order to avoid breakage this patch switches the relevant code to handle SYSTEM_VALUE_FIRST_VERTEX so that it can retain the same behavior. v2: change a3xx/fd3_emit.c and a4xx/fd4_emit.c from SYSTEM_VALUE_BASE_VERTEX to SYSTEM_VALUE_FIRST_VERTEX (Kenneth). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Rob Clark <robdclark@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com>
2018-04-19spirv: Lower BaseVertex to FIRST_VERTEX instead of BASE_VERTEXNeil Roberts1-1/+4
The base vertex in Vulkan is different from GL in that for non-indexed primitives the value is taken from the firstVertex parameter instead of being set to zero. This coincides with the new SYSTEM_VALUE_FIRST_VERTEX instead of BASE_VERTEX. v2 (idr): Add comment describing why SYSTEM_VALUE_FIRST_VERTEX is used for SpvBuiltInBaseVertex. Suggested by Jason. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-19compiler: Add SYSTEM_VALUE_FIRST_VERTEX and instrinsicsAntia Puentes5-0/+21
This VS system value will contain the value passed as <basevertex> for indexed draw calls or the value passed as <first> for non-indexed draw calls. It can be used to calculate the gl_VertexID as SYSTEM_VALUE_VERTEX_ID_ZERO_BASE plus SYSTEM_VALUE_FIRST_VERTEX. From the OpenGL 4.6 spec, 10.4 "Drawing Commands Using Vertex Arrays": - Page 352: "The index of any element transferred to the GL by DrawArraysOneInstance is referred to as its vertex ID, and may be read by a vertex shader as gl_VertexID. The vertex ID of the ith element transferred is first + i." - Page 355: "The index of any element transferred to the GL by DrawElementsOneInstance is referred to as its vertex ID, and may be read by a vertex shader as gl_VertexID. The vertex ID of the ith element transferred is the sum of basevertex and the value stored in the currently bound element array buffer at offset indices + i." Currently the gl_VertexID calculation uses SYSTEM_VALUE_BASE_VERTEX but this will have to change when the value of gl_BaseVertex is fixed. Currently its value is broken for non-indexed draw calls because it must be zero but we are setting it to <first>. v2: use SYSTEM_VALUE_FIRST_VERTEX as name for the value, instead of SYSTEM_VALUE_BASE_VERTEX_ID (Kenneth). v3 (idr): Rebase on Rob Clark converting nir_intrinsics.h to be generated. Reformat commit message to 72 columns. Reviewed-by: Neil Roberts <nroberts@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2018-04-18spirv: Add support for runtime descriptor array cap.Bas Nieuwenhuizen2-0/+5
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-04-18spirv: Add support for VK_EXT_descriptor_indexing uniform indexing caps.Bas Nieuwenhuizen2-0/+7
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-04-18spirv: Update spirv.h to 12f8de9f04327336b699b1b80aa390ae7f9ddbf4Bas Nieuwenhuizen2-4/+183
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-04-18meson: enable glcpp testDylan Baker1-1/+17
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-18glcpp/tests: Convert shell scripts to a python scriptDylan Baker3-267/+223
This ports glcpp-test.sh and glcpp-test-cr-lf.sh to a python script that accepts arguments for each line ending type. This should allow for better reporting to users. v2: - Use $PYTHON2 to be consistent with other tests in mesa Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-18glsl/tests: Remove unused compare_ir.py scriptDylan Baker1-58/+0
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-18meson: enable optimization-testDylan Baker1-0/+5
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-18glsl/tests: Convert optimization-test.sh to pure pythonDylan Baker4-238/+215
This patch converts optimization-test.sh to python, in this process it removes external shell dependencies including diff. It replaces the python script that generates shell scripts with a python library that generates test cases and runs them using subprocess. v2: - use $PYTHON2 to be consistent with other tests in mesa Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2018-04-18meson: run glsl compiler warnings testDylan Baker1-1/+9
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-18glsl/tests: reimplement warnings-test in pythonDylan Baker2-56/+75
This reimplements the test in python with a shell script wrapper that allows autotools to continue to run the test without realizing that anything has changed. Using python has two advantages, first it's portable so this test can be run on windows as well as Linux since it just requires python, no more diff, pwd or sh. It's also no longer tied to autotools implementation details, like the environment variables $srcdir and $abs_builddir, though the autotools shell wrapper still uses those, which makes it possible to run the test in meson. v2: - Use $PYTHON2 in script to be consistent with other scripts in mesa Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-04-17spirv: Accept doubles in FaceForward, Reflect and RefractNeil Roberts1-4/+18
The SPIR-V spec doesn’t specify a size requirement for these and the equivalent functions in the GLSL spec have explicit alternatives for doubles. Refract is a little bit more complicated due to the fact that the final argument is always supposed to be a scalar 32- or 16- bit float regardless of the other operands. However in practice it seems there is a bug in glslang that makes it convert the argument to 64-bit if you actually try to pass it a 32-bit value while the other arguments are 64-bit. This adds an optional conversion of the final argument in order to support any type. These have been tested against the automatically generated tests of glsl-4.00/execution/built-in-functions using the ARB_gl_spirv branch which tests it with quite a large range of combinations. The issue with glslang has been filed here: https://github.com/KhronosGroup/glslang/issues/1279 v2: Convert the eta operand of Refract from any size in order to make it eventually cope with 16-bit floats. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-17spirv: Add a 64-bit implementation of OpIsInfNeil Roberts1-3/+4
The only change neccessary is to change the type of the constant used to compare against. This has been tested against the arb_gpu_shader_fp64/execution/ fs-isinf-dvec tests using the ARB_gl_spirv branch. v2: Use nir_imm_floatN_t for the constant. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-17spirv: Use nir_imm_floatN_t for constants for GLSL450 builtinsNeil Roberts1-1/+1
There is an existing macro that is used to choose between either a float or a double immediate constant based on the bit size of the first operand to the builtin. This is now changed to use the new nir_imm_floatN_t helper function to reduce the number of places that make this decision. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-17nir/builder: Add a nir_imm_floatN_t helperNeil Roberts1-0/+13
This lets you easily build float immediates just given the bit size. If we have this single place here to handle this then it will be easier to add support for 16-bit floats later. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-17nir: return early when lowering a return at the end of a functionTimothy Arceri1-0/+6
Otherwise we create unused conditional return flags and things get unnecessarily ugly fast when lowering nested functions. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-17glsl: fix gcc 8 parenthesis warningMarc Dietrich1-2/+2
fixes warnings like this: [184/1137] Compiling C++ object 'src/compiler/glsl/glsl@sta/lower_jumps.cpp.o'. In file included from ../src/mesa/main/mtypes.h:48, from ../src/compiler/glsl_types.h:149, from ../src/compiler/glsl/lower_jumps.cpp:59: ../src/compiler/glsl/lower_jumps.cpp: In member function '{anonymous}::block_record {anonymous}::ir_lower_jumps_visitor::visit_block(exec_list*)': ../src/compiler/glsl/list.h:650:17: warning: unnecessary parentheses in declaration of 'node' [-Wparentheses] for (__type *(__inst) = (__type *)(__list)->head_sentinel.next; \ ^ ../src/compiler/glsl/lower_jumps.cpp:510:7: note: in expansion of macro 'foreach_in_list' foreach_in_list(ir_instruction, node, list) { ^~~~~~~~~~~~~~~ Signed-off-by: Marc Dietrich <marvin24@gmx.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-04-16compiler: int8/uint8 fixesRob Clark1-25/+12
A couple spots were missed for handling of the new INT8/UINT8 base type. Also de-duplicate get_base_type().. get_scalar_type() had nearly the same switch statement, with the exception that anything with base_type that was not scalar would return error_type. So just handle that one special case in get_scalar_type(). Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-16nir: fix ir_binop_gequal glsl_to_nir conversionErico Nunes1-1/+1
ir_binop_gequal needs to be converted to nir_op_sge when native integers are not supported in the driver. Otherwise it becomes no different than ir_binop_less after the conversion. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-04-14nir: lower 64bit subgroup shuffle intrinsicsDaniel Schürmann2-13/+56
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-14nir/spirv: Fix warning and add missing breaks.Daniel Schürmann2-0/+4
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-14nir: use ballot_bit_size when lowering ballot_bitfield_extractDaniel Schürmann1-1/+1
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-14nir: subgroups instructions for 64bit ballot sizesDaniel Schürmann1-6/+6
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-04-13glsl: #undef THIS macro to fix MSVC buildBrian Paul1-0/+5
THIS is a macro in one of the MSVC header files. It's also a token in the GLSL lexer. This causes a compilation failure with MSVC. This issue seems to be newly exposed after the recent mtypes.h removal patches. Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-04-13glsl: rename 'interface' var to 'iface' to fix MSVC buildBrian Paul1-7/+7
The recent mtypes.h removal patches seems to have exposed a MSVC issue where 'interface' is defined as a macro in an MSVC header file. Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-04-12Fix make checkMarek Olšák1-0/+1
2018-04-12Fix scons buildMarek Olšák1-0/+1
2018-04-12mesa: include mtypes.h lessMarek Olšák53-31/+63
- remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <brianp@vmware.com>
2018-04-12glsl: fix compat shaders in GLSL 1.40Timothy Arceri1-0/+2
The compatibility and core tokens were not added until GLSL 1.50, for GLSL 1.40 just assume all shaders built with a compat profile are compat shaders. Fixes rendering issues in Dawn of War II on radeonsi which has enabled OpenGL 3.1 compat support. Fixes: a0c8b49284ef "mesa: enable OpenGL 3.1 with ARB_compatibility" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105807
2018-04-11nir/vars_to_ssa: Simplify node matching codeCaio Marcelo de Oliveira Filho1-36/+31
The matching code doesn't make real use of the return value. The main function return value is ignored, and while the worker function propagate its return value, the actual callback never returns false. v2: Style fixes. (Jason) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>