summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* ac/nir: remove misleading conditionGrazvydas Ignotas2017-08-291-1/+1
| | | | | | | | | location is never set to INTERP_SAMPLE, and Nicolai comments: "... that part is misleading. location refers to the base location, not the final location of the sample, and it can never be INTERP_SAMPLE." Suggested-by: Nicolai Hähnle <[email protected]> Signed-off-by: Grazvydas Ignotas <[email protected]>
* ac/nir: silence maybe-uninitialized warningsGrazvydas Ignotas2017-08-291-6/+9
| | | | | | | | | | These are likely false positives, but are also annoying because they show up on every "make install", which causes ac_nir_to_llvm to be rebuilt here. Initializing those variables to NULL should be harmless even when unnecessary. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: clear dynamic_shader_stages on createGrazvydas Ignotas2017-08-291-0/+1
| | | | | | | | Valgrind reports it's being used uninitialized. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd: add .editorconfigGrazvydas Ignotas2017-08-292-0/+6
| | | | | | | | | amd/common/ and amd/vulkan/ are using tabs for indent, which doesn't match the settings in root .editorconfig, so let's override. Signed-off-by: Grazvydas Ignotas <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmationMarek Olšák2017-08-281-0/+3
| | | | | | | Ported from Vulkan. Not sure what this is good for.. maybe write confirmation from L2 flushes? Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: propagate VK_ERROR_OUT_OF_HOST_MEMORY to vk{Begin,End}CommandBuffer()Samuel Pitoiset2017-08-281-7/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: rename record_fail to record_result and use VkResultSamuel Pitoiset2017-08-282-9/+9
| | | | | | | | This will allow to propagate VK_ERROR_OUT_OF_HOST_MEMORY to vkEndCommandBuffer() when necessary. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* Revert "radeonsi: get the raster config from AMDGPU on SI"Marek Olšák2017-08-272-5/+0
| | | | | | | | | | | | This reverts commit fc99cb3c9edee3af773700cf7ebdc60dc02fcaba. "The performance went down from 64.7 to 51.4 fps in Valley and from 30.8 to 25.1 fps in Heaven on Radeon HD 7970. Other games seem to have also a 10-25% performance decrease." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102429 It looks like we can't use the raster config values from the kernel.
* radv/wsi: Compute correct row_pitch for GFX9.Dave Airlie2017-08-271-2/+6
| | | | | | | (commit split out by Bas Nieuwenhuizen) Fixes: 65477bae9cf "radv: enable GFX9 on radv" Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix sparse BO mapping merging.Bas Nieuwenhuizen2017-08-251-0/+1
| | | | | | | | If we merge a mapping with the mapping before it, we also need to not only change the offset, but also the bo offset. Fixes: 715df30a4e2 "radv/amdgpu: Add winsys implementation of virtual buffers." Reviewed-by: Dave Airlie <[email protected]>
* radv: Fix off by one in MAX_VBS assert.Bas Nieuwenhuizen2017-08-251-1/+1
| | | | | | | | e.g. 0 + 32 <= 32 should be valid. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Tested-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't set a new subpass on compute resolve.Bas Nieuwenhuizen2017-08-251-8/+0
| | | | | | | We don't use the render path so totally unneeded. Fixes: 19be95f71e6 "radv: add subpass resolve compute path" Reviewed-by: Dave Airlie <[email protected]>
* radv: Remove some intel comments from the resolve code.Bas Nieuwenhuizen2017-08-253-21/+0
| | | | | | These are clearly not applicable to radv. Reviewed-by: Kenneth Graunke <[email protected]>
* radv: don't crash if we have no framebufferDave Airlie2017-08-251-0/+4
| | | | | | | | | | | | Recording secondaries with no framebuffer attachment may make this happen, though this might not be the complete solution. (esp if someone does meta stuff in there, would we have to save things, not sure). Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: gfx9 has buffer sizing rules like pre-VI.Dave Airlie2017-08-251-1/+1
| | | | | | | | | This fixes: dEQP-VK.robustness.buffer_access.* on GFX9. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix predication on gfx9Dave Airlie2017-08-251-1/+3
| | | | | | | | When I added gfx9 I did it wrong, this fixes it. Fixes: 5247b311e9 "radv/gfx9: fix set predication packet." Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/debug: use util_strchrnul() to fix android build errorMauro Rossi2017-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | Similar to e09d04cd56 "radeonsi: use util_strchrnul() to fix android build error" Android Bionic does not support strchrnul() string function, gallium auxiliary util/u_string.h provides util_strchrnul() This change avoids the following warning and error: external/mesa/src/amd/common/ac_debug.c:501:15: warning: implicit declaration of function 'strchrnul' is invalid in C99 char *end = strchrnul(out, '\n'); ^ external/mesa/src/amd/common/ac_debug.c:501:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' char *end = strchrnul(out, '\n'); ^ ~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. Fixes: c2c3912410 "ac/debug: annotate IB dumps with the raw values" Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radeonsi: get the raster config from AMDGPU on SIMarek Olšák2017-08-242-0/+5
| | | | | | Not sure yet if we wanna do this on CIK and VI too. Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: Expose VK_KHX_multiview.Bas Nieuwenhuizen2017-08-242-0/+18
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement multiview draws.Bas Nieuwenhuizen2017-08-242-33/+112
| | | | | | | v2: - Use for_each_bit. - split emitting the draw packets out to separate functions. Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement determining the has_multiview_view_index key.Bas Nieuwenhuizen2017-08-241-4/+16
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Add shader support for multiviews.Bas Nieuwenhuizen2017-08-244-2/+44
| | | | | | | | | It uses an user SGPR to pass the view index to the shaders, except for the fragment shader where we use layer=view (which comes in handy when we want to do the NV ext that allows us to execute pre-FS stages once instead of per view). Reviewed-by: Dave Airlie <[email protected]>
* radv: Add multiview clears.Bas Nieuwenhuizen2017-08-243-19/+47
| | | | | | v2: Use for_each_bit. Reviewed-by: Dave Airlie <[email protected]>
* radv: Store multiview info in renderpass.Bas Nieuwenhuizen2017-08-242-1/+27
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Make shader key a struct.Bas Nieuwenhuizen2017-08-244-22/+24
| | | | | | | Some bits can be passed to almost every shader, and I don't like adding 5 variables. Reviewed-by: Dave Airlie <[email protected]>
* radv: Use 0 for the layer id if the vertex shader does not export it.Bas Nieuwenhuizen2017-08-241-3/+4
| | | | | | | To use when we have e.g. input attachments, but there is no layer export in the previous shader and hence no layered rendering. Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Implement input attachments with layered rendering.Bas Nieuwenhuizen2017-08-241-2/+11
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Determine if input attachments are used in the info pass.Bas Nieuwenhuizen2017-08-242-1/+11
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Cast sources of integer ops to int.Bas Nieuwenhuizen2017-08-241-0/+16
| | | | | | | | | The int32->float semantic conversion got dropped in a testcase, because the src was already float. On closer inspection I decided to add a few more casts for integer op operands to be safe too. Cc: 17.2 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx9: don't expose linear depth on vega.Dave Airlie2017-08-241-0/+4
| | | | | | | | This just zeros out the linear flags for gfx9 + depth formats. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't degrade tiling mode for small compressed or depth texture.Dave Airlie2017-08-241-6/+10
| | | | | | | | | This is what radeonsi does, so we should do the same, also vega doesn't support linear depth textures anyways. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: only minify image view width/height/depth before gfx9.Dave Airlie2017-08-242-7/+15
| | | | | | | | | | | For gfx9 the addressing for images has changed, so we need to provide the hw with the level0, however we still need to scale for format block differences (so our compressed upload paths still work). Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/image: don't rescale width/height if the format isn't changingDave Airlie2017-08-241-4/+6
| | | | | | | | | If the image view has the same format, we don't need to rescale the w/h. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: cleanup some image view descriptor setup.Dave Airlie2017-08-242-13/+21
| | | | | | | | | | | | Avoid passing the vulkan image creation into the image view descriptor setup. This cleans up the usage of range inside the init, instead using the properly inited values in the image view. This is just a cleanup but some future vega changes will depend on it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: emit sx_mrt_blend registersDave Airlie2017-08-243-3/+134
| | | | | | | | | | | | | GFX9 needs the SX MRT blend registers programmed, port over the code from radeonsi to workout the values from the blend state, and program the registers on rbplus systems. This fixes lots of: dEQP-VK.pipeline.blend.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: bump space check for indexed draw.Dave Airlie2017-08-241-1/+1
| | | | | | | | | | | For the GFX9 packet we need one more dword. Fixes an assert in: dEQP-VK.draw.shader_draw_parameters.base_vertex.draw_indexed Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: fixup db/stencil disable.Dave Airlie2017-08-241-3/+7
| | | | | | | | This fixes disabled Z/stencil. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: fix level count in color register setup.Dave Airlie2017-08-241-1/+1
| | | | | | | | There was an off by one here. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: use total levels in texture descriptorDave Airlie2017-08-241-1/+1
| | | | | | | | | We need to use all the levels when filling out the gfx9 descriptor. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Implement bc optimize.Bas Nieuwenhuizen2017-08-243-0/+33
| | | | | | | | Seems like we actually enabled it already, but did not implement the shader part. With this patch we do. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: refactor input variable iteration.Bas Nieuwenhuizen2017-08-241-19/+11
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/debug: invoke valgrind checks while parsing IBsNicolai Hähnle2017-08-231-0/+20
| | | | | | Help catch garbage data written into IBs. Reviewed-by: Marek Olšák <[email protected]>
* ac/debug: annotate IB dumps with the raw valuesNicolai Hähnle2017-08-231-18/+66
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/debug: use an explicit getter for fetching words from the IBNicolai Hähnle2017-08-231-153/+215
| | | | | | Guard against out-of-bounds accesses, and prepare for upcoming changes. Reviewed-by: Marek Olšák <[email protected]>
* ac/surface/gfx9: don't allow DCC for the smallest mipmap levelsMarek Olšák2017-08-221-1/+18
| | | | | | This fixes garbage there if we don't flush TC L2 after rendering. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: clean up EOP_DATA_SEL magic numbersMarek Olšák2017-08-221-6/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: properly handle imported textures with unexpected swizzle modeMarek Olšák2017-08-221-0/+5
| | | | | Cc: 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* amd/common: split out ac_parse_ib_chunk from ac_parse_ibNicolai Hähnle2017-08-222-8/+32
| | | | Reviewed-by: Marek Olšák <[email protected]>
* Android: Fix LLVM duplicated symbols linking for N and MRob Herring2017-08-211-3/+1
| | | | | | | | | | | | | | | | | | | | | Both statically linking libLLVMCore and dynamically linking libLLVM causes duplicated symbols in gallium_dri.so and it fails to dlopen. We don't really need to link libLLVMCore, but just need generated headers to be built first. Dynamically linking to libLLVM instead is enough to do that. Thanks to Qiang Yu for finding the root cause. With this change, we can align all versions and just have libLLVM as a shared lib dependency. This also requires changes in the M and N versions of LLVM to export the include paths for libLLVM. AOSP master is okay. Fixes: 26aee6f4d5a ("Android: rework LLVM build support") Reported-by: Mauro Rossi <[email protected]> Cc: 17.2 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* ac/nir: fixup layer/viewport export for GFX9.Dave Airlie2017-08-211-7/+25
| | | | | | | | GFX9 moved where the viewport index export goes. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>