summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-14i965/fs: clamp exec_size when an instruction has a scalar DF sourceSamuel Iglesias Gonsálvez1-3/+8
Then the SIMD lowering pass will get rid of any compressed instructions with scalar source (whether force_writemask_all or not) and we avoid hitting the Gen7 region decompression bug. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Suggested-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2017-04-14i965/fs: double regioning parameters and execsize for DF in IVB/BYTJuan A. Suarez Romero1-7/+43
In IVB and BYT, both regioning parameters and execution sizes are measured as 32-bits element size. So when we have something like: mov(8) g2<1>DF g3<4,4,1>DF We are not actually moving 8 doubles (our intention), but 4 doubles. We need to double the parameters to cope with this issue. However, horizontal strides don't behave as they're supposed to on IVB for DF regions, they will cause each 32-bit half of DF sources to be strided individually, and doubling the value won't make any difference. v2: - Use devinfo directly (Matt). - Use Baytrail instead of Valleview (Matt). - Use IvyBridge instead of Ivy (Matt) - Double the exec_size in code emission (Curro) v3: - Change hstride doubling by an assert and fix commit log (Curro). - Substitute remaining compiler->devinfo by devinfo (Curro). v4: - Fix comment (Curro). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2017-04-14i965/fs: add helper to retrieve instruction execution typeJuan A. Suarez Romero3-5/+64
The execution data size is the biggest type size of any instruction operand. We will use it to know if the instruction deals with DF, because in Ivy we need to double the execution size and regioning parameters. v2: - Fix typo in commit log (Matt) - Use static inline function instead of fs_inst's method (Curro). - Define the result as a constant (Curro). - Fix indentation (Matt). - Add braces to nested control flow (Matt). v3 (Curro): - Add get_exec_type() and other auxiliary functions and use them to calculate its size. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [ Francisco Jerez: Fix bogus 'type != BAD_FILE' check. Fix deduced execution type for integer vector types. Take destination type as execution type where there is no valid source. Assert-fail if the deduced execution type is byte. Move into brw_ir_fs.h header for consistency with the VEC4 back-end. ] Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2017-04-14i965: Handle IVB DF differences in the validator.Matt Turner1-0/+24
On IVB/BYT, region parameters and execution size for DF are in terms of 32-bit elements, so they are doubled. For evaluating the validity of an instruction, we halve them. v2 (Sam): - Add comments. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2017-04-14i965/disasm: also print nibctrl in IVB for execsize=8Iago Toral Quiroga1-3/+3
4-wide DF operations where NibCtrl applies require and execsize of 8 in IvyBridge/BayTrail. v2: - Refactor NibCtrl printing (Matt) Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2017-04-14nir: Destination component count of shader_clock intrinsic is 2Boyan Ding2-2/+3
This fixes the following error when using ARB_shader_clock on i965: vec1 32 ssa_0 = intrinsic shader_clock () () () intrinsic store_var (ssa_0) (clock_retval) (3) /* wrmask=xy */ error: src->ssa->num_components == num_components (nir/nir_validate.c:204) Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Cc: mesa-stable@lists.freedesktop.org
2017-04-14radeonsi: add missing initialization for userptr buffersNicolai Hähnle1-0/+4
Fix the accounting for memory usage of userptr buffers, which has been wrong forever (or at least for a long time). Also initialize flags. Without this initialization, the sparse buffer flag might end up being set, which leads to staging buffers being used unnecessarily (and incorrectly) in transfers to or from userptr buffers. This works around VM faults that occur with the radeon kernel module when running piglit ./bin/amd_pinned_memory decrement-offset map-buffer -auto Fixes: e077c5fe6579 ("gallium/radeon: transfers and invalidation for sparse buffers") Reported-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-14radv: remove the temp descriptor set infrastructureFredrik Höglund2-76/+28
It is no longer used. Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-04-14radv: use push descriptors in metaFredrik Höglund6-416/+301
Use push descriptors instead of temp descriptor sets. Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-04-14radv: add private push descriptors for metaFredrik Höglund2-0/+41
This allows meta to use push descriptors without disturbing user push descriptors. radv_meta_push_descriptor_set differs from vkCmdPushDescriptorSetKHR in that partial updates are not supported; all descriptors used in subsequent draw commands must be pushed at the same time. Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-04-14anv/blorp: Properly handle VK_ATTACHMENT_UNUSEDJason Ekstrand1-5/+22
The Vulkan driver was originally written under the assumption that VK_ATTACHMENT_UNUSED was basically just for depth-stencil attachments. However, the way things fell together, VK_ATTACHMENT_UNUSED can be used anywhere in the subpass description. The blorp-based clear and resolve code has a bunch of places where we walk lists of attachments and we weren't handling VK_ATTACHMENT_UNUSED everywhere. This commit should fix all of them. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Cc: <mesa-stable@lists.freedesktop.org>
2017-04-14anv/cmd_buffer: Use the null surface state for ATTACHMENT_UNUSEDJason Ekstrand1-2/+14
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Cc: <mesa-stable@lists.freedesktop.org>
2017-04-14anv/cmd_buffer: Always set up a null surface stateJason Ekstrand1-31/+19
We're about to start requiring it in yet another case and calculating exactly when one is needed is starting to get prohibitively expensive. A single surface state doesn't take up that much space so we may as well create one all the time. Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Cc: <mesa-stable@lists.freedesktop.org>
2017-04-14radeonsi: cope with missing disassemblyNicolai Hähnle1-1/+2
For robustness and testing purposes. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-14gallium/ddebug: dump missing members of pipe_draw_infoNicolai Hähnle2-0/+7
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-14radeonsi: enable ARB_shader_viewport_layer_arrayNicolai Hähnle3-2/+3
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-14radeonsi: handle ignored LAYER and VIEWPORT_INDEX writesNicolai Hähnle1-0/+20
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-14st/mesa: enable ARB_shader_viewport_layer_arrayNicolai Hähnle1-0/+5
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-14tgsi: clarify TGSI_SEMANTIC_{LAYER,VIEWPORT_INDEX}Nicolai Hähnle1-0/+10
Depending on pipe caps they can be writable in all vertex processing stages, but only the output of the last stage counts. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-14gallium: add PIPE_CAP_TGSI_TES_LAYER_VIEWPORTNicolai Hähnle17-0/+19
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-14configure.ac: add --enable-sanitize optionNicolai Hähnle1-1/+27
Enable code sanitizers by adding -fsanitize=$foo flags for the compiler and linker. In addition, this also disables checking for undefined symbols: running the address sanitizer requires additional symbols which should be provided by a preloaded libasan.so (preloaded for hooking into malloc & friends globally), and the undefined symbols check gets tripped up by that. Running the tests works normally via `make check`, but shows additional failures with the address sanitizer due to memory leaks that seem to be mostly leaks in the tests themselves. I believe those failures should really be fixed. In the mean-time, you can set export ASAN_OPTIONS=detect_leaks=0 to only check for more serious error types. v2: - fail reasonably when an unsupported sanitize flag is given (Eric Engestrom) Reviewed-by: Bartosz Tomczyk <bartosz.tomczyk86@gmail.com> (v1) Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-14anv/cmd_buffer: Flush the VF cache at the top of all primariesJason Ekstrand1-0/+12
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
2017-04-14anv/blorp: Flush the texture cache in UpdateBufferJason Ekstrand1-0/+7
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
2017-04-14anv: Limit VkDeviceMemory objects to 2GBJason Ekstrand1-0/+20
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2017-04-14intel/blorp: Add a blorp_emit_dynamic macroJason Ekstrand1-64/+50
This makes it much easier to throw together a bit of dynamic state. It also automatically handles flushing so you don't accidentally forget. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2017-04-14swr: Enable MSAA in OpenSWR software rendererBruce Cherniak6-25/+313
This patch enables multisample antialiasing in the OpenSWR software renderer. MSAA is a proof-of-concept/work-in-progress with bug fixes and performance on the way. We wanted to get the changes out now to allow several customers to begin experimenting with MSAA in a software renderer. So as not to impact current customers, MSAA is turned off by default - previous functionality and performance remain intact. It is easily enabled via environment variables, as described below. It has only been tested with the glx-lib winsys. The intention is to enable other state-trackers, both Windows and Linux and more fully support FBOs. There are 2 environment variables that affect behavior: * SWR_MSAA_FORCE_ENABLE - force MSAA on, for apps that are not designed for MSAA... Beware, results will vary. This is mainly for testing. * SWR_MSAA_MAX_SAMPLE_COUNT - sets maximum supported number of samples (1,2,4,8,16), or 0 to disable MSAA altogether. (The default is currently 0.) Reviewed-by: George Kyriazis <george.kyriazis@intel.com>
2017-04-14swr: Removed unnecessary PIPE_BIND flags from swr_is_format_supportedBruce Cherniak1-2/+1
Removed unnecessary and probably wrong PIPE_BIND_SCANOUT and PIPE_BIND_SHARED flags in favor of check on single PIPE_BIND_DISPLAY_TARGET flag. Reference llvmpipe change <bee4c7718a3bd57e3d99f0913d9081cd13fe5fd> Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2017-04-14swr: Align swr_context allocation to SIMD alignment.Bruce Cherniak1-2/+5
The context now contains SIMD vectors which must be aligned (specifically samplePositions in the rastState in the derived state). Failure to align can result in segv crash on unaligned memory access in vector instructions. Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2017-04-14swr: update gallium driver docsTim Rowley2-6/+12
v2: add back scons section, mention additional built swr libraries Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2017-04-14radv: remove irrelevant commentGrazvydas Ignotas1-1/+1
A leftover from anv. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-04-14radv: report timestampPeriod correctlyGrazvydas Ignotas2-2/+2
The kernel returns frequency in kHz, so to convert to nanosecond interval that Vulkan uses the dividend should be 1000000.0 and not 100000.0. This fixes the GPU graph in DOOM and matches the amdgpu-pro blob. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-04-14nir/print: add compute shader infoRob Clark1-0/+13
Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2017-04-14gallium/docs: small correction about register files for atomicsRob Clark1-2/+4
These can operate on MEMORY[], in addition to BUFFER[] and IMAGE[] Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-04-14freedreno: enable draw/batch reordering by defaultRob Clark2-3/+3
Probably should have flipped the switch a long time ago, since it doesn't seem to cause any problems and is a nice perf boost in a number of cases. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-04-14freedreno/ir3: small re-orderRob Clark1-24/+23
Small re-order of switch statement to handled op-code categories in order. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-04-14freedreno/ir3: move 'keeps' to block levelRob Clark5-20/+22
For things like SSBOs and atomics we'll want to track this at a block level. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-04-14freedreno/ir3: convert dynamic arrays to rallocRob Clark3-14/+8
Want to move one of these under ir3_block, so that gives a reason to migrate the remaining malloc/realloc to ralloc. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-04-14swr: add linux to scons buildGeorge Kyriazis2-7/+2
Make swr compile for both linux and windows. Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
2017-04-14radv: make sizes & offsets 32 bit in radv_descriptor_update_template_entry.Bas Nieuwenhuizen2-7/+7
v2: Also convert the calculations. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Fredrik Höglund <fredrik@kde.org>
2017-04-13docs: Update MESA_shader_integer_functions spec to version 3.Kenneth Graunke1-6/+8
When publishing this spec on the OpenGL ES registry, Jon Leech noticed that it didn't actually mention what the ES dependencies and interactions were. I looked at extensions_table.h and noted that we expose it in ES 3.0 contexts, and he added the obvious spec texts. The updated copy also contains our official extension number. https://github.com/KhronosGroup/OpenGL-Registry/issues/3 Acked-by: Matt Turner <mattst88@gmail.com>
2017-04-13radv: Set descriptor set limits.Bas Nieuwenhuizen1-15/+29
Properly and with comments this time. Signed-off-by: Bas Nieuwenhuizen <bansi@google.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-04-13radv: Increase integer sizes in descriptor sets.Bas Nieuwenhuizen1-8/+8
Needed if we want to allow them taking more than 64 KiB. The calculations of these already used 32 bits. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-04-14radv: support S8_UINT as a depth/stencil format.Dave Airlie1-1/+1
This enables a bunch of NotSupported CTS tests. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-04-14radv: bump maxGeometryShaderInvocations.Dave Airlie1-1/+1
This bumps it to the same level as amdgpu-pro, it also moves a bunch of dEQP-VK.geometry.instanced.* from NotSupported to Pass. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-04-13st/nine: Fix support for ps 1.4 dw and dz modifiersAxel Davy1-2/+2
RCP was used incorrectly to support NINED3DSPSM_DW and NINED3DSPSM_DZ. src.x was used as input instead of src.w or src.z. Fixes: https://github.com/iXit/Mesa-3D/issues/271 Signed-off-by: Axel Davy <axel.davy@ens.fr> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2017-04-13clover: Add missing include to compat headerJan Vesely1-0/+1
Fixes build failure with LLVM 4 Fixes: a981e68c26dc4079a335101da0033185030207f6 (clover: Fix build against clang SVN >= r299965) Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2017-04-13gallium/radeon: never use staging buffers with AMD_pinned_memoryNicolai Hähnle1-2/+16
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-04-13radeonsi: fix gl_BaseVertex in non-indexed drawsNicolai Hähnle3-4/+23
gl_BaseVertex is supposed to be 0 in non-indexed draws. Unfortunately, the way they're implemented, the VGT always generates indices starting at 0, and the VS prolog adds the start index. There's a VGT_INDX_OFFSET register which causes the VGT to start at a driver-defined index. However, this register cannot be written from indirect draws. So fix this unlikely case by setting a bit to tell the VS whether the draw is indexed or not, so that gl_BaseVertex can be adjusted accordingly when used. Fixes a bug in KHR-GL45.shader_draw_parameters_tests.ShaderMultiDrawArraysParameters.* Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-13radeonsi: provide VS_STATE input to all VS variantsNicolai Hähnle5-27/+18
v2: fix incorrect change in get_tcs_out_patch_stride Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-13radeonsi: change the bit-packing of LS out/TCS in dataNicolai Hähnle3-9/+14
Avoid conflicts when merging various VS state bits. Reviewed-by: Marek Olšák <marek.olsak@amd.com>