summaryrefslogtreecommitdiffstats
path: root/src/amd/common
Commit message (Collapse)AuthorAgeFilesLines
* ac/surface: increment surf_index only when tile swizzle is allowedMarek Olšák2017-08-042-3/+5
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: compute tile swizzle only when it's allowedMarek Olšák2017-08-041-2/+4
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: add RADEON_SURF_SHAREABLEMarek Olšák2017-08-041-0/+1
| | | | | | | Shareable textures won't use tile swizzle. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: remove RADEON_SURF_HAS_TILE_MODE_INDEXMarek Olšák2017-08-041-1/+0
| | | | | | | it's useless Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/surface: move tile_swizzle to ac_surface and document itMarek Olšák2017-08-042-2/+19
| | | | | | | Gfx9 will use it too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: fix streamout overflow predication on VI+Nicolai Hähnle2017-08-021-0/+1
| | | | | | | | | | There is a firmware regression that causes failures. Work around it by using the compute shader for query_buffer_objects to summarize the query results. v2: rename to PREDICATION_OP_BOOL64 (consistent with sid.h) Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: Add float cast before shadow comparator clamp.Bas Nieuwenhuizen2017-08-021-1/+2
| | | | | | | | LLVM complained about passing an i32 to a float clamp. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: 0f9e32519bb "ac/nir: clamp shadow texture comparison value on VI" Reviewed-by: Marek Olšák <[email protected]>
* radeon/ac: use ds_swizzle for derivs on si/cik.Dave Airlie2017-08-023-24/+43
| | | | | | | | | | | | This looks like it's supported since llvm 3.9 at least, so switch over radeonsi and radv to using it, -pro also uses this. We can now drop creating lds for these operations as the ds_swizzle operation doesn't actually write to lds at all. Acked-by: Marek Olšák <[email protected]> (stable requested due to fixing radv CIK conformance tests) Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: fix nir_op_unpack_64_2x32_split_y emissionConnor Abbott2017-08-011-1/+1
| | | | | | This was broken thanks to a typo in b2367cf. Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/nir: fix lsb emissionConnor Abbott2017-08-011-1/+11
| | | | | | | | | | | This makes it match radeonsi. The LLVM backend itself will emit the correct instruction, but LLVM might do incorrect optimizations since it thinks the output is undefined when the input is 0, even though it's not supposed to be. We really need a new intrinsic, or for the backend to become smarter and recognize this pattern. Cc: [email protected] Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: handle 10-bit format clamping workaround.Dave Airlie2017-08-012-6/+14
| | | | | | | | | | | | | | | This fixes: dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.* for a2r10g10b10 formats as destination on SI/CIK hardware. This adds support to the meta program for emitting 10-bit outputs, and adds 10-bit support to the fragment shader key. It also only does the int8/10 on SI/CIK. Fixes: f4e499ec7 (radv: add initial non-conformant radv vulkan driver) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: implement load_frag_coord intrinsicNicolai Hähnle2017-07-311-0/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_llvm_context to unpack_paramNicolai Hähnle2017-07-311-18/+18
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add and use ac_shader_abi::frag_posNicolai Hähnle2017-07-312-13/+18
| | | | | | v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add and use ac_shader_abi::{ancillary,sample_coverage}Nicolai Hähnle2017-07-312-6/+6
| | | | | | v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radv: move force_persample to ac_shader_info::force_persampleNicolai Hähnle2017-07-314-4/+8
| | | | | | | Avoid accessing radv-specific structures during the meat of NIR-to-LLVM translation. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use new function ac_build_umin for edgeflag clampingNicolai Hähnle2017-07-312-0/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: clamp shadow texture comparison value on VINicolai Hähnle2017-07-311-1/+13
| | | | | | | Needed for TC-compatible HTILE in radeonsi for test cases like piglit spec/arb_texture_rg/execution/fs-shadow2d-red-01.shader_test Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add always_vector argument to ac_build_gather_values_extendedNicolai Hähnle2017-07-313-19/+13
| | | | | | | | | | This simplifies a bunch of places that no longer need special treatment of value_count == 1. We rely on LLVM to optimize away the 1-element vector types. This fixes a bunch of bugs where 1-element arrays are indexed indirectly. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add ac_shader_abi::front_faceNicolai Hähnle2017-07-312-3/+3
| | | | | | v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to emit_ddxyNicolai Hähnle2017-07-311-15/+14
| | | | | | | Allocating the ddxy_lds is considered to be part of the API shader translation and not part of the ABI. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to SSBO intrinsic handlersNicolai Hähnle2017-07-311-55/+59
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: load buffer descriptors via ac_shader_abi::load_ssboNicolai Hähnle2017-07-312-8/+30
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to emit_discard_ifNicolai Hähnle2017-07-311-8/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: extract shader_info->fs.can_discard from NIR shader infoNicolai Hähnle2017-07-311-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: handle old-style shadow tex instructions correctlyNicolai Hähnle2017-07-311-1/+3
| | | | | | The first element is only extracted for new-style shadow tex. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: whitespace fixesNicolai Hähnle2017-07-311-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: use shader_info pass to determine whether instance_id is usedNicolai Hähnle2017-07-313-2/+9
| | | | | | This improves the separation of ABI and NIR translation. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: move setting shader_info->fs.writes_memory to radv-specific codeNicolai Hähnle2017-07-311-6/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add image and write parameter to ac_shader_abi::load_sampler_descNicolai Hähnle2017-07-312-19/+28
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add support for arrays-of-arrays to get_sampler_descNicolai Hähnle2017-07-311-5/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to tex_fetch_ptrs and related functionsNicolai Hähnle2017-07-311-75/+83
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add and use ac_shader_abi::load_sampler_descNicolai Hähnle2017-07-312-48/+84
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_tex and various related functionsNicolai Hähnle2017-07-311-117/+118
| | | | | | | Get most of the churn out of the way before actually loading samplers via the ABI. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add ac_shader_abi::chip_classNicolai Hähnle2017-07-312-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add ac_shader_abi::load_uboNicolai Hähnle2017-07-312-0/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_load_ubo_bufferNicolai Hähnle2017-07-311-8/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_{load,store}_var and get_deref_offset ↵Nicolai Hähnle2017-07-311-75/+75
| | | | | | helper Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_llvm_context to some helper functionsNicolai Hähnle2017-07-311-20/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_intrinsicNicolai Hähnle2017-07-311-52/+52
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add ac_nir_context::main_functionNicolai Hähnle2017-07-311-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: split scanning outputs from setting up output allocasNicolai Hähnle2017-07-311-8/+43
| | | | | | | The scanning phase sets the driver_location, because it is part of the ABI: radeonsi does the assignment differently. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_llvm_context to *build_alloca* helpersNicolai Hähnle2017-07-311-9/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: use ac_shader_abi::emit_outputsNicolai Hähnle2017-07-311-2/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: add ac_shader_abi::emit_outputs for hardware VS shadersNicolai Hähnle2017-07-311-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: translate NIR to LLVMNicolai Hähnle2017-07-311-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add ac_shader_abi::inputsNicolai Hähnle2017-07-312-0/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: begin splitting off ac_nir_contextNicolai Hähnle2017-07-312-234/+290
| | | | | | | | | | | | | The eventual goal is to hide all radv-specific details behind ac_nir_context::abi, so that the NIR->LLVM code can be re-used by radeonsi. During development, we live with a partial split, where some of the NIR->LLVM code still relies on linking back to the nir_to_llvm_context (which should ultimately be renamed to reflect that it's radv-specific). The idea is to get rid of these backlinks over time. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: start using ac_shader_abiNicolai Hähnle2017-07-311-20/+18
| | | | | | v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: move some VS input descriptions to ac_shader_abiNicolai Hähnle2017-07-311-0/+40
| | | | | | v2: use LLVM values instead of function parameter indices Reviewed-by: Marek Olšák <[email protected]>