aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Add panfrost_model_name helperAlyssa Rosenzweig2019-12-132-0/+19
| | | | | | This gives us a string representation of a GPU ID. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Move property queries to _encoderAlyssa Rosenzweig2019-12-134-51/+97
| | | | | | We'll want these in non-Gallium devices. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Move nir_undef_to_zero to Midgard compilerAlyssa Rosenzweig2019-12-135-2/+2
| | | | | | Nothing Gallium about it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pandecode: Add castAlyssa Rosenzweig2019-12-131-1/+1
| | | | | | Fixes minor coverity warning about the format specifier. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pass size to panfrost_batch_get_scratchpadAlyssa Rosenzweig2019-12-134-18/+35
| | | | | | We'll compute the size with the new scratchpad helpers. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Calculate maximum stack_size per batchAlyssa Rosenzweig2019-12-134-0/+22
| | | | | | | We'll need this so we can allocate a stack for the batch large enough for all the jobs within it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Handle misc. cppcheck warningsAlyssa Rosenzweig2019-12-135-15/+13
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Remove unused ld/st packing hepersAlyssa Rosenzweig2019-12-131-18/+0
| | | | | | Identified by cppcheck. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Handle minor cppcheck issuesAlyssa Rosenzweig2019-12-132-2/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Emit SFBD/MFBD after a batch, instead of beforeAlyssa Rosenzweig2019-12-136-85/+105
| | | | | | | | The size of the scratchpad (as well as some tiler details) depend on the contents of the batch, so we need to wait to defer filling out the FBD until after all draws are queued. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Route stack_size from compilerAlyssa Rosenzweig2019-12-132-0/+2
| | | | | | We'll need it in pan_context.c Signed-off-by: Alyssa Rosenzweig <[email protected]>
* etnaviv: add missing vs_needs_z_div handling to NIR backendJonathan Marek2019-12-131-1/+21
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: add missing formatsJonathan Marek2019-12-132-28/+60
| | | | | | | Add missing texture/render formats supported by hardware. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove swizzle from format tableJonathan Marek2019-12-131-80/+65
| | | | | | | | | | The only format that needs swizzle is R8 emulated with L8, so we can get rid of the SWIZ(X, Y, Z, W) everywhere. Note: R8G8 also had a swizzle, but it wasn't necessary. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: disable integer vertex formats on pre-HALTI2 hardwareJonathan Marek2019-12-131-1/+13
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: update INT_FILTER choice for GLES3 formatsJonathan Marek2019-12-134-2/+40
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: set output mode and saturate bitsJonathan Marek2019-12-135-3/+30
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: sRGB render target supportJonathan Marek2019-12-133-15/+32
| | | | | | | Note: no srgb render target support before HALTI3 Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove sRGB formats from format tableJonathan Marek2019-12-131-23/+9
| | | | | | | This supports all sRGB formats, without having them in the format table. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* gallium/swr: Fix arb_transform_feedback2Tomasz Pyra2019-12-1310-14/+66
| | | | | | | | Added support for pause/resume transform feedback. Fixed DrawTransformFeedback. Reviewed-by: Jan Zielinski <[email protected]> Reviewed-by: Krzysztof Raszkowski <[email protected]>
* radv: handle unaligned vertex fetches on GFX6/GFX10Samuel Pitoiset2019-12-131-47/+86
| | | | | | | | | | | | | | | | | | | | The Vulkan spec doesn't have any words for vertex attributes alignment. Fixes a test failure on GFX6 and a GPU hang on GFX10 with: dEQP-VK.spirv_assembly.instruction.spirv1p4.entrypoint.tess_con_pc_entry_point vkpipeline-db results on GFX10: Totals from affected shaders: SGPRS: 463772 -> 472972 (1.98 %) VGPRS: 343208 -> 343752 (0.16 %) Spilled SGPRs: 323 -> 336 (4.02 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 13806200 -> 14164472 (2.60 %) bytes Max Waves: 84021 -> 83755 (-0.32 %) Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2161 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* i965/iris: perf-queries: don't invalidate/flush 3d pipelineLionel Landwerlin2019-12-134-25/+21
| | | | | | | | | | | | | | | | | | | Our current implementation of performance queries is fairly harsh because it completely flushes and invalidates the 3d pipeline caches at the beginning and end of each query. An argument can be made that this is how performance should be measured but it probably doesn't reflect what the application is actually doing and the actual cost of draw calls. A more appropriate approach is to just stall the pipeline at scoreboard, so that we measure the effect of a draw call without having the pipeline in a completely pristine state for every draw call. v2: Use end of pipe PIPE_CONTROL instruction for Iris (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/perf: drop batchbuffer flushing at query beginLionel Landwerlin2019-12-131-8/+0
| | | | | | | | | | | | This was initially intended to fix issues with the query timings going occassionally high. It turns out there was a bug in the attribution of OA reports to our context when parsing the OA data. This led to reports flagged with other context IDs to be included in our queries results. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* v3d: actually root the first BO in a command list in the jobIago Toral Quiroga2019-12-131-1/+1
| | | | | | | We were passing cl->bo, which is NULL, so v3d_job_add_bo was a no-op. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* etnaviv: drop compiled_rs_state forward declarationChristian Gmeiner2019-12-131-1/+0
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: remove not used etna_bits_ones(..)Christian Gmeiner2019-12-131-6/+0
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* swr: Fix build with llvm-10.0.Vinson Lee2019-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Fix build error after llvm-10.0 commit ("1b2842bf902a [Alignment][NFC] CreateMemSet use MaybeAlign"). ../src/gallium/drivers/swr/swr_shader.cpp: In member function ‘void (* BuilderSWR::CompileGS(swr_context*, swr_jit_gs_key&))(HANDLE, HANDLE, SWR_GS_CONTEXT*)’: ../src/gallium/drivers/swr/swr_shader.cpp:738:65: error: no matching function for call to ‘BuilderSWR::MEMSET(llvm::Value*&, llvm::Constant*, int, long unsigned int)’ MEMSET(pStream, C((char)0), VERTEX_COUNT_SIZE + CONTROL_HEADER_SIZE, sizeof(float) * KNOB_SIMD_WIDTH); ^ In file included from ../src/gallium/drivers/swr/rasterizer/jitter/builder.h:163:0, from ../src/gallium/drivers/swr/swr_shader.cpp:43: src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp:51:11: note: candidate: llvm::CallInst* SwrJit::Builder::MEMSET(llvm::Value*, llvm::Value*, uint64_t, llvm::MaybeAlign, bool, llvm::MDNode*, llvm::MDNode*, llvm::MDNode*) CallInst* MEMSET(Value *Ptr, Value *Val, uint64_t Size, MaybeAlign Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr) ^ src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp:51:11: note: no known conversion for argument 4 from ‘long unsigned int’ to ‘llvm::MaybeAlign’ In file included from ../src/gallium/drivers/swr/rasterizer/jitter/builder.h:163:0, from ../src/gallium/drivers/swr/swr_shader.cpp:43: src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp:56:11: note: candidate: llvm::CallInst* SwrJit::Builder::MEMSET(llvm::Value*, llvm::Value*, llvm::Value*, llvm::MaybeAlign, bool, llvm::MDNode*, llvm::MDNode*, llvm::MDNode*) CallInst* MEMSET(Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, bool isVolatile = false, MDNode *TBAATag = nullptr, MDNode *ScopeTag = nullptr, MDNode *NoAliasTag = nullptr) ^ src/gallium/drivers/swr/rasterizer/jitter/gen_builder.hpp:56:11: note: no known conversion for argument 4 from ‘long unsigned int’ to ‘llvm::MaybeAlign’ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Jan Zielinski <[email protected]>
* turnip: implement subpass input attachmentsJonathan Marek2019-12-123-13/+42
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: CmdClearAttachments fixesJonathan Marek2019-12-121-4/+13
| | | | | | | Partial depth/stencil clear and skipping unused attachments. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: subpass reworkJonathan Marek2019-12-124-474/+300
| | | | | | | A renderpass is a tile load/store cycle. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: add dirty bit for push constantsJonathan Marek2019-12-122-14/+20
| | | | | | | Fixes push constants not updating in some cases. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: no 8x msaa on 128bpp formatsJonathan Marek2019-12-121-2/+4
| | | | | | | | We don't have an entry for cpp 128 in the tile_alignment table, but I don't think the HW supports this at all (blob driver just doesn't have 8x msaa). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: fix VK_IMAGE_ASPECT_STENCIL_BIT image viewJonathan Marek2019-12-121-9/+15
| | | | | | | | Use a special format which allows sampling the stencil and set the correct swizzle. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: set FRAG_WRITES_SAMPMASK bitJonathan Marek2019-12-121-1/+2
| | | | | | | GPU hangs if SAMPMASK_REGID is used without this bit. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: set load_layer_id to zeroJonathan Marek2019-12-121-0/+8
| | | | | | | | We don't have layered rendering and ir3 doesn't support this intrinsic, so just set it to zero for now. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: update tile_align_w/tile_align_hJonathan Marek2019-12-121-2/+2
| | | | | | | | | | It looks like the actual tile alignment requirement is less than 32x32, but in some cases input attachment texture needs 64 alignment. Reduced the h alignment to 16 to compensate and it seems to work fine. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: fix tile layout logicJonathan Marek2019-12-121-3/+5
| | | | | | | | Use DIV_ROUND_UP and stop trying to increase the tile_count width/height once tile_align_w/tile_align_h are reached. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: fix hw binning render areaJonathan Marek2019-12-121-1/+1
| | | | | | | Fix a mistake in the y2 coordinate. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/registers: add a6xx texture format for stencil samplerJonathan Marek2019-12-121-0/+3
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/ir3: add GLSL_SAMPLER_DIM_SUBPASS to tex_infoJonathan Marek2019-12-121-0/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: fix incorrectly failing assertJonathan Marek2019-12-121-0/+1
| | | | | | | | pColorBlendState is allowed to be NULL if subpass has >0 color attachments but they are all unused. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* panfrost: Query core count and thread tls allocAlyssa Rosenzweig2019-12-132-3/+32
| | | | | | This is supported only on newer kernels. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Factor out panfrost_query_rawAlyssa Rosenzweig2019-12-131-3/+13
| | | | | | We would like to query properties other than product ID. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* st/glsl_to_nir: use nir based program resource list builderTimothy Arceri2019-12-138-10/+20
| | | | | | | | | | | | | | | | | Here we use the NIR based builder to add everything to the resource list execpt for SSO packed varyings. Since the details of those varyings get lost during packing we leave the special handing to the GLSL IR pass for now. In order to do this we add some bools to the build resource list functions. Using the NIR based resource list builder gets us a step closer to using a native NIR based linker. It should also be faster than the GLSL IR builder, one because the NIR optimisations should mean we add less entries due to better optimisations, and two because nir gives us better lists to work with and we don't need to walk the entire IR to find the resources. Ack-by: Alejandro Piñeiro <[email protected]>
* st/glsl_to_nir: call gl_nir_lower_buffers() a little laterTimothy Arceri2019-12-131-1/+2
| | | | | | | In a following commit we will use a NIR based builder to build the OpenGL resource list, so we want to delay this call a little. Ack-by: Alejandro Piñeiro <[email protected]>
* glsl: add subroutine support to nir_build_program_resource_list()Timothy Arceri2019-12-131-2/+31
| | | | | | | This is required so we can use the NIR linker to link GLSL in addition to spirv. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: add support for named varyings in nir_build_program_resource_list()Timothy Arceri2019-12-131-15/+286
| | | | | | | | | | | This adds support for adding names of varying to the resource list which is required for us to use this function with the glsl linker. Support for names is optional for spirv which is why it had not been added yet. This is mostly a copy of the GLSL IR code adapted to nir. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: copy the new data fields when converting to nirTimothy Arceri2019-12-131-0/+4
| | | | | | | These fields added in the previous commit will be used to make use of a NIR based GLSL linker. Reviewed-by: Alejandro Piñeiro <[email protected]>
* nir: add some fields to nir_variable_dataTimothy Arceri2019-12-131-0/+28
| | | | | | These will be used to provide NIR linking functionality to GLSL. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: copy the how_declared field when converting to nirTimothy Arceri2019-12-131-0/+10
| | | | | | This is needed to make use of nir_build_program_resource_list(). Reviewed-by: Alejandro Piñeiro <[email protected]>