summaryrefslogtreecommitdiffstats
path: root/src/freedreno
Commit message (Collapse)AuthorAgeFilesLines
* turnip: format table fixesJonathan Marek2019-10-151-19/+12
| | | | | | | | | | | * Fix R16G16 SCALED and R16G16B16A16 SCALED having texture format * Fix B5G6R5 swap value * Use R8_UINT instead of R8_UNORM for S8_UINT rb format * Disable 96-bit texture formats instead having a check for NPOT formats * Don't fail assert on D24X8 format Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: add format_is_uint/format_is_sintJonathan Marek2019-10-151-0/+22
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: add astc format layoutJonathan Marek2019-10-151-28/+28
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: fix assert failing for 0 color attachmentsJonathan Marek2019-10-151-2/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: fix segmentation fault with compute pipelineJonathan Marek2019-10-151-1/+1
| | | | | | | Not supported, so always set pointer to NULL Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: fix segmentation fault in eventsJonathan Marek2019-10-152-4/+18
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: fix 32 vertex attributes caseJonathan Marek2019-10-151-3/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: fix triangle stripJonathan Marek2019-10-151-1/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/regs: update a6xx 2d blit bitsJonathan Marek2019-10-151-22/+30
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: implement fquantize2f16Jonathan Marek2019-10-141-0/+5
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: implement texop_texture_samplesJonathan Marek2019-10-141-5/+9
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: fix GETLOD for negative LODsJonathan Marek2019-10-141-2/+2
| | | | | | | Note: for output type U32, negative LOD is not sign extended from 16 bits Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: implement fdd{x,y}_coarse opcodesJonathan Marek2019-10-141-0/+2
| | | | | | | Same as regular fddx/fddy. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: increase size of inputs/outputs arraysJonathan Marek2019-10-141-2/+2
| | | | | | | Makes it possible to support 32 varyings. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: remove input ncomp fieldJonathan Marek2019-10-142-4/+0
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/ir3: handle multi component alu src when propagating shiftsRob Clark2019-10-101-5/+11
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: drop unused paramRob Clark2019-10-101-6/+5
| | | | Signed-off-by: Rob Clark <[email protected]>
* nir: add nir_shader_compiler_options::lower_to_scalarMarek Olšák2019-10-101-0/+2
| | | | | | | | This will replace PIPE_SHADER_CAP_SCALAR_ISA. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* freedreno: Enable the nir_opt_algebraic_late() pass.Daniel Schürmann2019-09-301-0/+14
| | | | | Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* turnip: Fix failure behavior of vkCreateGraphicsPipelines.Eric Anholt2019-09-271-10/+7
| | | | | | | | | According to the 1.1.123 spec: "The implementation will attempt to create all pipelines, and only return VK_NULL_HANDLE values for those that actually failed." Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: Silence compiler warning about uninit pipeline.Eric Anholt2019-09-271-1/+1
| | | | | | The code was fine as far as I see, but the warning was irritating. Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: Add a .editorconfig and .dir-locals.elEric Anholt2019-09-273-1/+13
| | | | | | | | | I was inheriting the one from src/freedreno with funny tabs, while this driver is written with normal Mesa 3-space indents. Unfortunately I have to add both files, because I use emacs and emacs prefers .dir-locals to .editorconfig :( Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: Add todo for d24_s8 copiesBas Nieuwenhuizen2019-09-271-0/+1
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Disallow NPoT formats.Bas Nieuwenhuizen2019-09-271-10/+18
| | | | | | | Copying is a mess for these formats for now. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Always use UINT formats for copies.Bas Nieuwenhuizen2019-09-271-3/+29
| | | | | | | | | | | | | | Looks like r16_unorm might have precision issues. dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.r16_unorm.r16_unorm.general_general fails, but the dumped images in the xml are the same so I'd guess the low bits are the issue. r8_unorm and r16_uint work. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Add image->image blitting.Bas Nieuwenhuizen2019-09-271-14/+165
| | | | | | | 3D blits & format reinterpretation are still TBD. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: emit texture and uniform stateJonathan Marek2019-09-262-15/+339
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: add some shader information in pipeline stateJonathan Marek2019-09-262-0/+32
| | | | | | | | This information is needed by texture/uniform descriptors. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: use nir_opt_copy_prop_varsJonathan Marek2019-09-261-0/+2
| | | | | | | | | | | Avoids getting a "load_output" in a case like this: gl_Position = ubuf.MVP * ubuf.position[gl_VertexIndex]; frag_pos = gl_Position.xyz; Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: lower samplers and uniform buffer indicesJonathan Marek2019-09-262-0/+147
| | | | | | | | | Lower these to something compatible with ir3, and save the descriptor set and binding information. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: basic descriptor sets (uniform buffer and samplers)Jonathan Marek2019-09-262-102/+430
| | | | | | | | Mostly copy-paste from radv, with a few modifications. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: enable linear filteringJonathan Marek2019-09-261-2/+2
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: align layer_sizeJonathan Marek2019-09-261-1/+1
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: use linear tiling for scanout imageJonathan Marek2019-09-261-2/+9
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: implement image view descriptorJonathan Marek2019-09-262-2/+90
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: implement sampler stateJonathan Marek2019-09-262-0/+73
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: fix vertex_idJonathan Marek2019-09-261-1/+1
| | | | | | | | ir3 uses non-zero based vertex id for a6xx Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: emit shader immediatesJonathan Marek2019-09-261-0/+37
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: use image tile_mode for gmem configurationJonathan Marek2019-09-241-5/+3
| | | | | | | | | Fixes at least this deqp test: dEQP-VK.api.smoke.triangle Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* turnip: fix binning shader compilationJonathan Marek2019-09-241-4/+6
| | | | | | | | ir3 segfaults if nonbinning is NULL for the bininng pass shader. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* freedreno/regs: A couple of tess updatesKristian H. Kristensen2019-09-182-3/+41
| | | | Reviewed-by: Eric Anholt <[email protected]>
* freedreno/regs: Fix CP_DRAW_INDX_OFFSET commandKristian H. Kristensen2019-09-181-0/+14
| | | | | | On A5xx+ the INDX_BASE pointer is 64 bit. Reviewed-by: Eric Anholt <[email protected]>
* freedreno/a6xx: Turn on vectorize_ioKristian H. Kristensen2019-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want this for tessellation eventually, but we can turn it on now. Shader-db results: total instructions in shared programs: 8612905 -> 8611387 (-0.02%) instructions in affected programs: 164952 -> 163434 (-0.92%) total dwords in shared programs: 11952000 -> 11950560 (-0.01%) dwords in affected programs: 68096 -> 66656 (-2.11%) total full in shared programs: 315019 -> 315009 (<.01%) full in affected programs: 1642 -> 1632 (-0.61%) total constlen in shared programs: 2463654 -> 2463654 (0.00%) constlen in affected programs: 0 -> 0 total (ss) in shared programs: 152379 -> 152409 (0.02%) (ss) in affected programs: 1503 -> 1533 (2.00%) total (sy) in shared programs: 96473 -> 96525 (0.05%) (sy) in affected programs: 654 -> 706 (7.95%) total max_sun in shared programs: 1172454 -> 1172472 (<.01%) max_sun in affected programs: 104 -> 122 (17.31%) Signed-off-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* freedreno/a6xx: Track location of gl_Position out as we link itKristian H. Kristensen2019-09-182-10/+8
| | | | | | | | | | | | | | When using xfb and rasterizing, the fragment shader may have fewer inputs than the vertex shader outputs. We can't rely on gl_Position to be placed at fs->total_in, but have to instead remember where we add it in the link map and use that location. Fixes 100+ tesselation dEQPs under dEQP-GLES31.functional.tessellation.primitive_discard.* dEQP-GLES31.functional.tessellation.user_defined_io.* Reviewed-by: Eric Anholt <[email protected]>
* tu: Set up glsl types.Bas Nieuwenhuizen2019-09-181-0/+3
| | | | | | | | | | | Addresses this assert: deqp-vk: ../mesa-freedreno-9999/src/compiler/glsl_types.cpp:1244: static const glsl_type *glsl_type::get_interface_instance(const glsl_struct_field *, unsigned int, enum glsl_interface_packing, bool, const char *): Assertion `glsl_type_users > 0' failed. running dEQP-VK.api.smoke.triangle . Fixes: 624789e3708 "compiler/glsl: handle case where we have multiple users for types" Reviewed-by: Lionel Landwerlin <[email protected]>
* freedreno: Fix invalid read when a block has no instructions.Eric Anholt2019-09-161-2/+3
| | | | | | | | | | | | | We can't deref list_(first/last)_entries unless we know we have at least one. Instead, just use our IP we've been tracking as we go to set up the start ip, and fill in the end IP as we walk instructions. Fixes a complaint in valgrind on dEQP-GLES3.functional.transform_feedback.* which sometimes has an empty main (non-END) block when the VS inputs are just directly mapped to outputs without any ALU ops. Reviewed-by: Rob Clark <[email protected]>
* freedreno/a6xx: pre-calculate userconst stateobj sizeRob Clark2019-09-121-0/+1
| | | | | | | | The AnTuTu "garden" benchmark overflows the fixed size constbuffer stateobject, so lets be more clever and calculate (a potentially slightly pessimistic) actual size. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: Implement primitive count queries on GPUKristian H. Kristensen2019-09-062-0/+5
| | | | | | | | | | The driver can't determine PIPE_QUERY_PRIMITIVES_GENERATED or PIPE_QUERY_PRIMITIVES_EMITTED once we support geometry or tessellation, since these stages add primitives at runtime. Use the WRITE_PRIMITIVE_COUNTS event to write back the primitive counts and implement a hw query for this. Reviewed-by: Rob Clark <[email protected]>
* freedreno/a2xx: formats updateJonathan Marek2019-09-061-3/+3
| | | | | | | | | | | | | | For render formats, update fd2_pipe2color to only work with HW supported render formats, and remove the format whitelist is_format_supported. This patch enables float render formats (which work). For vertex/texture formats, use a generic function which translates using the bitsize of the channels. Since we fake support for some vertex formats, check for these in is_format_supported to avoid enabling them as sampler formats. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* freedreno/a2xx: implement polygon offsetJonathan Marek2019-09-061-0/+2
| | | | | | | | | Fixes failures in the following deqp tests: dEQP-GLES2.functional.polygon_offset.* Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>