summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radv/meta: cleanup some unused code pathDave Airlie2017-05-082-34/+1
| | | | | | | | After moving everything to using push constants, these paths are no longer needed. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: port blit to using push constantsDave Airlie2017-05-081-100/+65
| | | | | | | Remove use of vertex buffer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move blit2d to using push constantsDave Airlie2017-05-082-75/+59
| | | | | | | This allows us to drop the vertex buffer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move clear color to using push constantsDave Airlie2017-05-082-130/+78
| | | | | | | | | | | | The color clear value is uniform and needs only to be emitted from the frag shader, so just push it down via a push constant, and remove the vertex buffer completely. The depth clear value needs to be emitted from the vertex shader, but is only a single value. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: use novertex save path for resolve pass.Dave Airlie2017-05-082-2/+2
| | | | | | | This was missing in the original change. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set base/ranges for push constant loads.Dave Airlie2017-05-086-0/+26
| | | | | | | | | This isn't necessary yet but I'd like to use the range in some future patches. [airlied: add new resolve pass] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop resolve hack workaroundsDave Airlie2017-05-073-104/+1
| | | | | | | | | This drops the resolve workarounds that change an image tiling mode behinds it's back, this is horrible and breaks the image_view->image relationship. Remove all this. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: select resolve pathsDave Airlie2017-05-071-8/+50
| | | | | | | | | | | | | | | | There are 3 resolve paths, the fastest being the hw resolver but it has restriction on tile modes and can't do subresolves, the compute resolver is next speed wise, but can't handle DCC destinations, the fragment resolver handles that case. This will end up with a slow down as currently we hack the hw resolver paths when they shouldn't work, but we shouldn't keep doing that. The next patch removes the hacks. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add resolve pass using fragment/vertex shadersDave Airlie2017-05-076-2/+699
| | | | | | | | | | | In order to resolve into DCC enabled dests we need to use the fragment shader. This reuses the code from the compute path and implements a resolve path in vertex/fragment shader. This code isn't used until later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add subpass resolve compute pathDave Airlie2017-05-072-0/+94
| | | | | | | | | | This adds a path to allow compute resolves to be used for subpass resolves. This isn't used yet, but will be later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/resolve: split resolve emission out for computeDave Airlie2017-05-071-63/+78
| | | | | | | This will allow to add a subpass compute resolve path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: split out core part of resolve shaderDave Airlie2017-05-073-113/+140
| | | | | | | | I want to reuse the same code for the fragment shader version of the resolve shaders. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add srgb conversion to end of resolve shader.Dave Airlie2017-05-073-5/+61
| | | | | | | | | | | If we are resolving into an srgb dest, we need to convert to linear so the store does the conversion back. This should fix some wierdness seen when we subresolves hit the compute path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: Fix missing snprintf symbol on Windows.Jose Fonseca2017-05-071-0/+4
| | | | | | | | | | Copy nir_print.c's snprintf definition for now, to unbreak Windows builds. We can and should cleanup all snprintf definitions in a follow up change, but I rather not leave Windows build broken any further. Trivial.
* nv50/ir: Replace NV50_PROGRAM_IR_* by PIPE_SHADER_IR_*Pierre Moreau2017-05-075-10/+7
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Remove unused translation methodsPierre Moreau2017-05-072-10/+3
| | | | | | | This code was merged commented out, and has stayed that way ever since. Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Free target if we failed to create a programPierre Moreau2017-05-071-1/+3
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Fail if encountering unknown shader typePierre Moreau2017-05-071-2/+2
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radv: set PERF_MOD in sample state like radeonsi.Dave Airlie2017-05-071-1/+2
| | | | | | | This just aligns the code with radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: apply the tess+GS hang workaround to Polaris12 as wellDave Airlie2017-05-071-1/+2
| | | | | | | | | As I pointed out for radeonsi, and AMD confirmed, so fix this in radv as well. Cc: "17.1" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: small texture targetIndex tidy upTimothy Arceri2017-05-071-5/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix broken indentationTimothy Arceri2017-05-071-7/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: some C99 tidy upsTimothy Arceri2017-05-071-24/+10
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support to copy buffer subdata functionsTimothy Arceri2017-05-074-3/+43
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove _mesa from static functionTimothy Arceri2017-05-071-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: stop calling _mesa_init_buffer_object_functions()Timothy Arceri2017-05-071-3/+0
| | | | | | | After calling this we were then overriding all the functions with st versions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_buffer_storage() staticTimothy Arceri2017-05-072-13/+7
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_copy_buffer_sub_data() staticTimothy Arceri2017-05-072-17/+8
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_clear_buffer_sub_data() staticTimothy Arceri2017-05-072-29/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for flush mapped buffer functionsTimothy Arceri2017-05-074-3/+33
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_flush_mapped_buffer_range() staticTimothy Arceri2017-05-072-15/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for unmap buffer functionsTimothy Arceri2017-05-074-2/+25
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split unmap_buffer() in twoTimothy Arceri2017-05-071-12/+17
| | | | | | | This will allow us to implement KHR_no_error support for unmap functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make _mesa_unmap_buffer() staticTimothy Arceri2017-05-072-9/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support for some map buffer functionsTimothy Arceri2017-05-075-4/+67
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: split out validation from map_buffer_range()Timothy Arceri2017-05-071-27/+50
| | | | | | | This will allow us to add KHR_no_error support for *BufferRange functions. Reviewed-by: Eric Anholt <[email protected]>
* mesa: make map_buffer_range() staticTimothy Arceri2017-05-072-20/+13
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Drop BRW_NEW_BLORP from 3DSTATE_VF atom.Kenneth Graunke2017-05-061-2/+1
| | | | | | | | BLORP doesn't program 3DSTATE_VF, since it doesn't use index buffers, making the setting irrelevant. So there's no need to re-emit it after a BLORP operation - the old setting will still be in place. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Port 3DSTATE_VF to genxml and simplify the implementation.Kenneth Graunke2017-05-063-43/+29
| | | | | | | | | | | | | The whole "it might be used for non-indexed draws" thing is no longer true - it turns out this was a mistake, and removed in OpenGL 4.5. (See Marek's commit 96cbc1ca29e0b1f4f4d6c868b8449999aecb9080.) So we can simplify this and just program 0 for non-indexed draws. We can also use #if blocks to remove the atom on Ivybridge/Baytrail, now that they have a separate atom list from Haswell. No more runtime checks. Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: Simplify _mesa_primitive_restart_index().Kenneth Graunke2017-05-061-10/+2
| | | | | | | We can use a simple shift equation rather than a switch statement. Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "radeonsi: constify a bunch of the perfcounter structs."Marek Olšák2017-05-063-46/+52
| | | | | | | This reverts commit 7088b655e8828bb960f528dd33132de27c505b8f. It breaks performance counters. If you use them with this commit, they hang the machine hard. Sysrq and ssh don't work.
* Revert "radeonsi: fix build with GCC 4.8"Marek Olšák2017-05-061-1/+1
| | | | | | This reverts commit 485ece83aceb3a35792efbc6fe2bca57ba46c04a. It's needed to revert 7088b655e8828bb960f528dd33132de27c505b8f.
* freedreno/a3xx: fix hang w/ large render targets and small gmemRob Clark2017-05-063-0/+7
| | | | | | | | | Possibly other gen's have a similar limit. Fixes glmark2 -b shadow with larger resolutions on devices with small gmem (for example, fullscreen 1080p on 8x16/db410c). Cc: [email protected] Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add macro to declare variable length arraysRob Clark2017-05-061-18/+21
| | | | | | We have enough of these, that we should stop open coding this. Signed-off-by: Rob Clark <[email protected]>
* glsl: skip tree grafting for sampler and image typesNicolai Hähnle2017-05-061-0/+11
| | | | | | | v2: - use is_sampler()/is_image() instead (Samuel Pitoiset) Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: teach lower_ubo_reference about samplers inside structuresSamuel Pitoiset2017-05-061-0/+15
| | | | | | | | | | | | | | In a situation like: (tex vec4 (record_ref (var_ref f) tex) (constant vec2 (0.000000 0.000000)) 0 1 () ) The sampler needs to be lowered, otherwise this ends up with "ir_dereference_variable @ 0x229a100 specifies undeclared variable `ubo_load_temp' @ 0x2290440" Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: link bindless layout qualifiersSamuel Pitoiset2017-05-061-0/+44
| | | | | | | | | | | | From section 4.4.6 of the ARB_bindless_texture spec: "If both bindless_sampler and bound_sampler, or bindless_image and bound_image, are declared at global scope in any compilation unit, a link- time error will be generated." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: do not count bindless samplers/images when linking uniformsSamuel Pitoiset2017-05-061-2/+2
| | | | | | | | | | | | | From section 2.14.8 of the ARB_bindless_texture spec: "(modify second paragraph, p. 126) ... against the MAX_COMBINED_TEXTURE_IMAGE_UNITS limit. Samplers accessed using texture handles (section 3.9.X) are not counted against this limit." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: lower bindless sampler/image packed varyingsSamuel Pitoiset2017-05-061-0/+14
| | | | | | | | v3: - rebase (and remove (sampler) ? 1 : vector_elements) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: implement ARB_bindless_texture conversionsSamuel Pitoiset2017-05-063-10/+84
| | | | | | | | | | | | | | | | | | | | | | | | From section 5.4.1 of the ARB_bindless_texture spec: "In the following four constructors, the low 32 bits of the sampler type correspond to the .x component of the uvec2 and the high 32 bits correspond to the .y component." uvec2(any sampler type) // Converts a sampler type to a // pair of 32-bit unsigned integers any sampler type(uvec2) // Converts a pair of 32-bit unsigned integers to // a sampler type uvec2(any image type) // Converts an image type to a // pair of 32-bit unsigned integers any image type(uvec2) // Converts a pair of 32-bit unsigned integers to // an image type v4: - fix up comment style v3: - rebase (and remove (sampler) ? 1 : vector_elements) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>