summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert MR 369 (Fix extract_i8 and extract_u8 for 64-bit integers)Kenneth Graunke2019-03-091-24/+10
| | | | | | | This broke piles of image load store tests (179 failures on CI, mesa_master build #15546, previous build right before this landed was green). I'd rather not leave the tree on fire over the weekend, so let's revert for now, and we can figure out what happened next week.
* nir/algebraic: Add missing 16-bit extract_[iu]8 patternsIan Romanick2019-03-081-0/+3
| | | | | | | | | | No shader-db changes on any Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Add missing 64-bit extract_[iu]8 patternsIan Romanick2019-03-081-0/+3
| | | | | | | | | | No shader-db changes on any Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Remove redundant extract_[iu]8 patternsIan Romanick2019-03-081-14/+4
| | | | | | | | No shader-db changes on any Intel platform. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Fix up extract_[iu]8 after loop unrollingIan Romanick2019-03-081-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Skylake, Broadwell, and Haswell had similar results. (Skylake shown) total instructions in shared programs: 15256840 -> 15256837 (<.01%) instructions in affected programs: 4713 -> 4710 (-0.06%) helped: 3 HURT: 0 helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 helped stats (rel) min: 0.06% max: 0.08% x̄: 0.06% x̃: 0.06% total cycles in shared programs: 372286583 -> 372286583 (0.00%) cycles in affected programs: 198516 -> 198516 (0.00%) helped: 1 HURT: 1 helped stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10 helped stats (rel) min: <.01% max: <.01% x̄: <.01% x̃: <.01% HURT stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10 HURT stats (rel) min: 0.01% max: 0.01% x̄: 0.01% x̃: 0.01% No changes on any other Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Move lower_explicit_io much laterJason Ekstrand2019-03-081-3/+5
| | | | | | | | | Now that nir_opt_copy_prop_vars can properly handle array derefs on vectors, it's safe to move UBO and SSBO lowering to late in the pipeline. This should allow NIR to actually start optimizing SSBO access. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/nir: Move lower_mem_access_bit_sizes to postprocess_nirJason Ekstrand2019-03-081-2/+1
| | | | | | | | | It doesn't really matter where this pass goes as long as it's after we call nir_lower_explicit_io and before we go into the back-end. Putting it brw_postprocess_nir lets us move nir_lower_explicit_io significantly later in the pipeline. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* freedreno/ir3: turn on [iu]mul_highRob Clark2019-03-081-0/+4
| | | | | | | | | | Which also requires uadd_carry lowering Until recently this was lowered in glsl ir so it went unnoticed that we weren't lowering it. Fixes: 1d8994a63b5 glsl: [u/i]mulExtended optimization for GLSL Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix ir3_cmdline harderRob Clark2019-03-081-2/+2
| | | | | | Fixes: 45271702ec9 freedreno: fix ir3_cmdline build Fixes: 7530d4abfcf glsl/freedreno/panfrost: pass gl_context to the standalone compiler Signed-off-by: Rob Clark <[email protected]>
* st/dri: Set the PIPE_BIND_SHARED flag on create_image_with_modifiers.Eric Anholt2019-03-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | With createImage(), the caller was expected to set a SHARED flag if they needed the ability to get a GEM handle. DRI3, wayland, and gbm all set it, EGL_MESA_drm_image passes it through, and surfaceless doesn't need it because there's no way to request a handle. With the new createImageWithModifiers() DRI method to replace it, the expectation is that you'll always be able to share the buffer, so the flag is unnecessary in its arguments. However, we do need to tell gallium about this expectation. Without this, kmscube's modifiers path using gbm_bo_create_with_modifiers(&modifier, 1) instead of gbm_bo_create(SCANOUT | SHARED) will call the driver's resource_create() function wtih PIPE_BIND_SHARED unset, so the driver (particularly renderonly drivers) may allocate in such a way that it can't return an answer from gbm_bo_get_handle(). I used to have a hack in v3d using count==1 && modifier==LINEAR to indicate that you wanted SHARED anyway, but that was dropped recently. Fixes: 59527a36e975 ("v3d: Restructure RO allocations using resource_from_handle.") Reviewed-by: Kristian H. Kristensen <[email protected]>
* iris: Use copy_region and staging resources to avoid transfer stallsKenneth Graunke2019-03-084-14/+161
| | | | | | | | | | | | This is similar to intel_miptree_map_blit and intel_buffer_object.c's temporary blits in i965. Improves performance of DiRT Rally by 20-25% by eliminating stalls. Breaks piglit's spec/arb_shader_image_load_store/host-mem-barrier, by using the GPU to do uploads, exposing a st/mesa issue where it doesn't give us memory_barrier() calls. This is a pre-existing issue and will be fixed by a later patch (currently out for review).
* android: fix missing backspace for line continuationEric Engestrom2019-03-081-1/+1
| | | | | | | Reported-by: Clayton Craft <[email protected]> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109944 Fixes: e1d81decf7a093867f05 "build: make passing an incorrect pointer type a hard error" Signed-off-by: Eric Engestrom <[email protected]>
* prog_to_nir: fix write from vps to FOGKarol Herbst2019-03-081-1/+7
| | | | | | | | | | | for fragment programs we already treat fog as a single component value, but for vp we didn't. Fixes fog related piglit tests with my out of tree Nouveau nir patches. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* iris: Track last VS URB entry sizeSagar Ghuge2019-03-083-0/+11
| | | | | | | | | | | | Return immediately if last VS URB entry size is good enough for BLORP operation v2: Fix comments (Caio) Signed-off-by: Sagar Ghuge <[email protected]> Suggested-by: Kenneth Graunke<[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Refactor code to share 3DSTATE_URB_* packetSagar Ghuge2019-03-083-59/+60
| | | | | | | | | | v2: 1) Set IRIS_DIRTY_URB bit (Caio) 2) Get rid of unnecessary function (Caio) Signed-off-by: Sagar Ghuge <[email protected]> Suggested-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx/meson: use full include path for dri_interface.hEric Engestrom2019-03-086-7/+5
| | | | | | | | | | | | Everything else uses `#include "GL/internal/dri_interface.h"` instead, and this full path was even already used in other parts of GLX. While at it, nothing uses `inc_gl_internal` anymore so let's remove it as well. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Tested-by: Clayton Craft <[email protected]>
* hgl/meson: drop unused include directoryEric Engestrom2019-03-081-1/+1
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Tested-by: Clayton Craft <[email protected]>
* intel/compiler: silence unitialized variable warning in opt_vector_float()Brian Paul2019-03-081-1/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/decoders: silence uninitialized variable warnings in gen_print_batch()Brian Paul2019-03-081-2/+2
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* st/mesa: init hash keys with memset(), not designated initializersBrian Paul2019-03-082-5/+17
| | | | | | | | | | Since the compiler may not zero-out padding in the object. Add a couple comments about this to prevent misunderstandings in the future. Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits") Reviewed-by: Roland Scheidegger <[email protected]>
* gitlab-ci: fix llvm version (7 doesn't have a ".0")Eric Engestrom2019-03-081-1/+1
| | | | | Fixes: 85ee157283c667372baf "gitlab-ci: autotools needs to be told which llvm version to use" Signed-off-by: Eric Engestrom <[email protected]>
* build: make passing an incorrect pointer type a hard errorEric Engestrom2019-03-083-0/+3
| | | | | | | | | | | | | | | | | | More or less any of this issue pointed out by the compiler is a coding error. Make sure we flag it and bail loudly. v2: - apply the change to autotools and scons as well (Emil) - C++ doesn't need this, it's already an error and the flag doesn't exist (Gert) v3: - drop scons, flags are not checked so until someone adds that functionality we can't have this. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> # v1 Reviewed-by: Emil Velikov <[email protected]> # v1 [Emil: apply the same change to autotools and scons] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* r600: cast pointer to expected typeEric Engestrom2019-03-081-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* gitlab-ci: autotools needs to be told which llvm version to useEric Engestrom2019-03-081-0/+1
| | | | | Fixes: 45d58cd91567b39f51af "gitlab-ci: only build the default (=latest) and oldest llvm versions" Signed-off-by: Eric Engestrom <[email protected]>
* gitlab-ci: only build the default (=latest) and oldest llvm versionsEric Engestrom2019-03-082-36/+12
| | | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* travis: clean upEric Engestrom2019-03-081-3/+2
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* travis: drop unused varsEric Engestrom2019-03-081-5/+0
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* travis: fix meson build by letting `auto` do its jobEric Engestrom2019-03-081-2/+1
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* autotools: don't build libGLES*.so with GLVNDEric Engestrom2019-03-081-2/+8
| | | | | | | | | | | | GLVND already provides these, so distro packagers have been deleting them all along. Let's save ourselves the trouble and not build them in the first place. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: don't build libGLES*.so with GLVNDEric Engestrom2019-03-081-5/+7
| | | | | | | | | | | | GLVND already provides these, so distro packagers have been deleting them all along. Let's save ourselves the trouble and not build them in the first place. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* pipebuffer: s/PB_ALL_USAGE_FLAGS/PB_USAGE_ALL/Brian Paul2019-03-081-1/+1
| | | | | | | To fix build failure. I guess my meson configuration has assertions disabled for some reason. Trivial fix.
* svga: remove SVGA_RELOC_READ flag in SVGA3D_BindGBSurface()Brian Paul2019-03-081-1/+1
| | | | | | | | | | This fixes a rendering issue where UBO updates aren't always picked up by drawing calls. This issue effected the Webots robotics simulator. VMware bug 2175527. Testing Done: Webots replay, piglit, misc Linux games Reviewed-by: Thomas Hellstrom <[email protected]>
* svga: refactor draw_vgpu10() functionBrian Paul2019-03-081-105/+141
| | | | | | | The draw_vgpu10() function was huge. Move the code for preparing the vertex buffers and the index buffer into separate functions. Reviewed-by: Neha Bhende <[email protected]>
* st/mesa: whitespace, formatting fixes in st_cb_flush.cBrian Paul2019-03-081-14/+19
| | | | Trivial.
* st/mesa: move, clean-up shader variant key decls/initsBrian Paul2019-03-082-10/+7
| | | | | | | Move the variant key declarations inside the scope they're used. Use designated initializers instead of memset() calls. Reviewed-by: Neha Bhende <[email protected]>
* winsys/svga: use new pb_usage_flags enum typeBrian Paul2019-03-083-6/+26
| | | | | | | | | And add a comment that we're implicitly converting PIPE_TRANSFER_ flags to PB_USAGE_ flags in one place. And statically assert that the enum values match. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* pipebuffer: whitespace fixes in pb_buffer.hBrian Paul2019-03-081-52/+49
| | | | | Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* pipebuffer: use new pb_usage_flags enum typeBrian Paul2019-03-0811-32/+45
| | | | | | | | Use a new enum type instead of 'unsigned' to make things a bit more understandable. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* svga: add svga shader type in the shader variantCharmaine Lee2019-03-0810-31/+33
| | | | | | | | With this patch, the svga shader type will be saved in the shader variant, and there is no need to pass in the shader type to the define/destroy variant functions. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: add some const qualifiers in u_bitmask.cBrian Paul2019-03-081-6/+10
| | | | | | | And add/update comments. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: whitespace cleanups in u_bitmask.[ch]Brian Paul2019-03-082-84/+85
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* nir/linker: fix ARRAY_SIZE query with xfb varyingsAlejandro Piñeiro2019-03-081-1/+2
| | | | | | For a non-array varying, it is expecting ARRAY_SIZE as 1, instead of 0. Reviewed-by: Timothy Arceri <[email protected]>
* nir/linker: Fix TRANSFORM_FEEDBACK_BUFFER_INDEXAntia Puentes2019-03-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | From the ARB_enhanced_layouts specification: "For the property TRANSFORM_FEEDBACK_BUFFER_INDEX, a single integer identifying the index of the active transform feedback buffer associated with an active variable is written to <params>. For variables corresponding to the special names "gl_NextBuffer", "gl_SkipComponents1", "gl_SkipComponents2", "gl_SkipComponents3", and "gl_SkipComponents4", -1 is written to <params>." We were storing the xfb_buffer value, instead of the value corresponding to GL_TRANSFORM_FEEDBACK_BUFFER_INDEX. Note that the implementation assumes that varyings would be sorted by offset and buffer. Signed-off-by: Antia Puentes <[email protected]> Signed-off-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir/linker: use nir_gather_xfb_infoAlejandro Piñeiro2019-03-081-186/+54
| | | | | | | | | | | | | Instead of a custom ARB_gl_spirv xfb gather info pass. In fact, this is not only about reusing code, but the current custom code was not handling properly how many varyings are enumerated from some complex types. So this change is also about fixing some corner cases. v2: Use util_bitcount, simplify current stage check (Kenneth) Reviewed-by: Timothy Arceri <[email protected]>
* nir/xfb: handle arrays and AoA of basic typesAlejandro Piñeiro2019-03-081-10/+32
| | | | | | | | | | | | | | | | | | On OpenGL, a array of a simple type adds just one varying. So gl_transform_feedback_varying_info struct defined at mtypes.h includes the parameters Type (base_type) and Size (number of elements). This commit checks this when the recursive add_var_xfb_outputs call handles arrays, to ensure that just one is addded. We also need to take into account AoA here v2: use glsl_type_is_leaf from nir_types (Timothy Arceri) v3: simplified aoa check, without the need ot using glsl_type_is_leaf, using glsl_types_is_struct (Timothy Arceri) Reviewed-by: Timothy Arceri <[email protected]>
* nir_types: add glsl_type_is_struct helperAlejandro Piñeiro2019-03-082-0/+7
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* nir/xfb: sort varyings tooAlejandro Piñeiro2019-03-081-2/+17
| | | | | | | | | | Right now we are only re-sorting outputs. But it is better to sort too varyings, as linker expect them to be sorted out (as it was done on GLSL). For varyings, and to make easier to compute buffer_index, we sort also by buffer. We could do the same for outputs, but we lack a reason for that, so we left it as it is (just offset). Reviewed-by: Timothy Arceri <[email protected]>
* nir/xfb: adding varyings on nir_xfb_info and gather_infoAlejandro Piñeiro2019-03-084-12/+49
| | | | | | | | | | | | | | | | | | | | | | | | | In order to be used for OpenGL (right now for ARB_gl_spirv). This commit adds two new structures: * nir_xfb_varying_info: that identifies each individual varying. For each one, we need to know the type, buffer and xfb_offset * nir_xfb_buffer_info: as now for each buffer, in addition to the stride, we need to know how many varyings are assigned to it. For this patch, the only case where num_outputs != num_varyings is with the case of doubles, that for dvec3/4 could require more than one output. There are more cases though (like aoa), that will be handled on following patches. v2: updated after new nir general XFB support introduced for "anv: Add support for VK_EXT_transform_feedback" v3: compute num_varyings beforehand for allocating, instead of relying on num_outputs as approximate value (Timothy Arceri) Reviewed-by: Timothy Arceri <[email protected]>
* nir_types: add glsl_varying_count helperAlejandro Piñeiro2019-03-082-0/+7
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* nir/xfb: add component_offset at nir_xfb_infoAlejandro Piñeiro2019-03-082-0/+4
| | | | | | | | | | | | | | | Where component_offset here is the offset when accessing components of a packed variable. Or in other words, location_frac on nir.h. Different places of mesa use different names for it. Technically nir_xfb_info consumer can get the same from the component_mask, it seems somewhat forced to make it to compute it, instead of providing it. v2: rename local location_frac for comp_offset, more similar to the intended use (Timothy Arceri) Reviewed-by: Timothy Arceri <[email protected]>