summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Set location on structure-split sampler uniform variablesKenneth Graunke2019-04-121-0/+1
| | | | | | | | | | | | | gl_nir_lower_samplers_as_deref splits structure uniform variables, creating new variables for individual fields. As part of that, it calculates a new location. It then never set this on the new variables. Thanks to Michael Fiano for finding this bug. Fixes crashes on i965 with Piglit's new tests/spec/glsl-1.10/execution/samplers/uniform-struct test, which was reduced from the failing case in Michael's app. Fixes: f003859f97c nir: Make gl_nir_lower_samplers use gl_nir_lower_samplers_as_deref Reviewed-by: Timothy Arceri <[email protected]>
* panfrost: use os_mmap and os_munmapMateusz Krzak2019-04-121-3/+4
| | | | | | | 32-bit needs mmap64 for 64-bit offsets. We get 64-bit offsets from kernel. Signed-off-by: Mateusz Krzak <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: cast bo_handles pointer to uintptr_t firstMateusz Krzak2019-04-121-1/+1
| | | | | | | Required for 64-bit kernel to interpret the pointer from 32-bit userspace. Signed-off-by: Mateusz Krzak <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* anv/pipeline: Fix MEDIA_VFE_STATE::PerThreadScratchSpace on gen7Jason Ekstrand2019-04-121-3/+23
| | | | | | | | We were always programming it with the Broadwell convention which is too large by a factor of two on Haswell and just plain wrong on IVB and BYT. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* gitlab-ci: add lima to the buildEric Engestrom2019-04-121-1/+1
| | | | | Suggested-by: Karol Herbst <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* ac: use the common helper ac_apply_fmask_to_sampleMarek Olšák2019-04-121-64/+5
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: set AC_FUNC_ATTR_READNONE for image opcodes where it was missingMarek Olšák2019-04-122-0/+5
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa: don't overwrite existing shader files with MESA_SHADER_CAPTURE_PATHMarek Olšák2019-04-121-3/+17
| | | | Reviewed-by: Tapani Pälli <[email protected]>
* glsl: allow the #extension directive within code blocks for the dri optionMarek Olšák2019-04-121-0/+9
| | | | | | for Viewperf 13 Acked-by: Timothy Arceri <[email protected]>
* ac/nir: remove some useless integer casts for ALU operationsSamuel Pitoiset2019-04-121-16/+0
| | | | | | | Sources are always casted to integers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: remove useless integer cast in visit_image_load()Samuel Pitoiset2019-04-121-1/+1
| | | | | | | | ac_build_image_opcode() casts if necessary and buffer images are casted too. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: remove useless integer cast in adjust_sample_index_using_fmask()Samuel Pitoiset2019-04-121-1/+0
| | | | | | | It's already casted if necessary in ac_build_image_opcode(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: remove useles LLVMGetUndef for nir_op_pack_64_2x32_splitSamuel Pitoiset2019-04-121-2/+1
| | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac: add ac_build_load_helper_invocation() helperSamuel Pitoiset2019-04-124-18/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac: add ac_build_ddxy_interp() helperSamuel Pitoiset2019-04-124-48/+25
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac: add ac_build_umax() and use it where possibleSamuel Pitoiset2019-04-123-15/+13
| | | | | | | This changes the predicate from LessThan to Equal. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: make use of ac_build_umin() where possibleSamuel Pitoiset2019-04-121-5/+5
| | | | | | | This changes the predicate from LessThan to Equal. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: make use of ac_build_imin() where possibleSamuel Pitoiset2019-04-121-5/+5
| | | | | | | This changes the predicate from LessThan to Equal. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: make use of ac_build_imax() where possibleSamuel Pitoiset2019-04-121-7/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* lima: add bool parameter to type_size functionKarol Herbst2019-04-121-1/+1
| | | | | | | | | Fixes: 035759b61ba1778d5143cdf3a8795a62dd5d8a60 ("nir/i965/freedreno/vc4: add a bindless bool to type size functions") Signed-off-by: Karol Herbst <[email protected]> Tested-by: Icenowy Zheng <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* nvc0/nir: enable bindless textureKarol Herbst2019-04-121-1/+1
| | | | Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: add support for bindless imagesKarol Herbst2019-04-121-4/+152
| | | | Signed-off-by: Karol Herbst <[email protected]>
* nv50/ir/nir: handle bindless textureKarol Herbst2019-04-121-2/+18
| | | | Signed-off-by: Karol Herbst <[email protected]>
* ac/nir_to_llvm: add image bindless supportTimothy Arceri2019-04-122-57/+155
| | | | | | With this all piglit bindless image tests pass on radeonsi. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir_to_llvm: make get_sampler_desc() more generic and pass it the image ↵Timothy Arceri2019-04-121-18/+21
| | | | | | | | intrinsic This will be required by the bindless support in the following patches. Reviewed-by: Marek Olšák <[email protected]>
* glsl/nir: add support for lowering bindless images_derefsKarol Herbst2019-04-129-6/+108
| | | | | | | | | | | v2: handle atomics as well make use of nir_rewrite_image_intrinsic v3: remove call to nir_remove_dead_derefs v4: (Timothy Arceri) dont actually call lowering yet Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v3) Reviewed-by: Marek Olšák <[email protected]>
* glsl/nir: fetch the type for images from the deref instructionKarol Herbst2019-04-121-3/+3
| | | | | | | | fixes retrieving the sampler type for bindless images stored inside structs. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl_to_nir: handle bindless texturesKarol Herbst2019-04-122-6/+25
| | | | | | | | | v2: add support for AMD Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (v1) Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* nir/i965/freedreno/vc4: add a bindless bool to type size functionsTimothy Arceri2019-04-1216-59/+76
| | | | | | | This required to calculate sizes correctly when we have bindless samplers/images. Reviewed-by: Marek Olšák <[email protected]>
* nir: move brw_nir_rewrite_image_intrinsic into common codeKarol Herbst2019-04-126-44/+47
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* lima: lower bool to float when building shadersIcenowy Zheng2019-04-123-3/+4
| | | | | | | | | | | | | | | | | Both processors of Mali Utgard are float-only, so bool are not acceptable data type of them. Fortunately the NIR compiler infrastructure has a lower pass to lower bool to float. Call this lower pass to lower bool to float for both GP and PP. This makes Glamor on Xorg server 1.20.3 at least doesn't hang when starting gtk3-demo. The old map of nir op bcsel is changed to fcsel, and the map of b2f32 in PP is dropped because it's not needed now (it's originally only mapped to ppir_op_mov). Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
* panfrost: Guard against reading past end of bufferTomeu Vizoso2019-04-121-0/+3
| | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: split asserts in pandecodeTomeu Vizoso2019-04-121-3/+2
| | | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* llvmpipe: fix undefined shift 1 << 31.Dave Airlie2019-04-121-1/+1
| | | | | | | Pointed out by coverity. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* swrast: fix undefined shift of 1 << 31Dave Airlie2019-04-121-1/+1
| | | | | | | Pointed out by coverity Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: fix undefined shift of (1 << 31)Dave Airlie2019-04-121-1/+1
| | | | | | | Pointed out by a coverity scan. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* iris: Actually pin the scratch BO.Kenneth Graunke2019-04-111-0/+8
| | | | | | | | | We were pinning it for compute shaders, and pinning it when restoring saved buffers, but we never actually pinned it in the original batch for VS/TCS/TES/GS/FS. Fixes rendering in GFXBench5's Tessellation demo and a bunch of Piglit geometry shader tests.
* anv: store heap address bounds when initializing physical deviceLionel Landwerlin2019-04-112-11/+21
| | | | | | | | | | | | | | | | | | | | We can then reuse those bounds to initialize the VMA heaps at logical device creation. This fixes an issue on EHL which has only 36bits of VMA. We were incorrectly using the fixed 48bits upper bound to initialize the logical device heap, resulting in addresses beyong the device's limits. v2: Don't confuse heap size (limited by system memory) and VMA size (limited by number of addressing bits the platform has) v3: Fix low heap vma_size :( (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Reported-by: James Xiong <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]> (v2)
* intel/common: Support bigger right-shifts with mi_builderJason Ekstrand2019-04-112-3/+20
| | | | Because why not?
* anv/cmd_buffer: Use gen_mi_sub instead of gen_mi_add with a negativeJason Ekstrand2019-04-111-1/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Move mi_memcpy and mi_memset to gen_mi_builderJason Ekstrand2019-04-116-91/+106
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for queriesJason Ekstrand2019-04-111-214/+58
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for conditional renderingJason Ekstrand2019-04-112-70/+41
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for indirect dispatchJason Ekstrand2019-04-111-16/+13
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for indirect draw parametersJason Ekstrand2019-04-111-65/+16
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for computing resolve predicatesJason Ekstrand2019-04-111-93/+35
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Use gen_mi_builder for CmdDrawIndirectByteCountJason Ekstrand2019-04-111-102/+22
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/common: Add unit tests for gen_mi_builderJason Ekstrand2019-04-113-0/+667
| | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/common: Add a MI command builderJason Ekstrand2019-04-111-0/+691
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* v3d: Add an optimization pass for redundant flags updates.Eric Anholt2019-04-115-0/+143
| | | | | | | | | | | | Our exec masking introduces lots of redundant flags updates, and even without that there will be cases where NIR comparisons on the same sources for different reasons may generate the same comparison instruction before the selection. total instructions in shared programs: 6492930 -> 6460934 (-0.49%) total uniforms in shared programs: 2117460 -> 2115106 (-0.11%) total spills in shared programs: 4983 -> 4987 (0.08%) total fills in shared programs: 6408 -> 6416 (0.12%)