aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/a6xx: Set tfetch correctly for compressed formatsKristian H. Kristensen2020-05-061-4/+1
| | | | | | | The fetchsize is just the blocksize for compressed formats, which gets rid of the ASTC special cases add handles ETC1/2 as well. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* freedreno/fdl: Align after dividing by block sizeKristian H. Kristensen2020-05-061-13/+9
| | | | | | | | | For compressed formats, we need to align the number of blocks, not the logical number of pixels in the texture. Only compressed formats have block width/height > 1, so we can just unconditionally multiply the alignment by the block width/height. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* radeonsi: fix compilation of monolithic PSMarek Olšák2020-05-061-1/+2
| | | | | | | | | | | | | | | This was totally broken. Monolithic PS is only used if FBFETCH or interpolateAtSample are used. When the PS prolog was built, it overwrote ctx->main_fn. Discovered by @eefano. Fixes: 8832a884345686e6a8b2c0c8aa7515ad3f775b9e "radeonsi: move PS LLVM code into si_shader_llvm_ps.c" Closes: #2814 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4918>
* tgsi_to_nir: translate non-vec4 image stores correctlyMarek Olšák2020-05-061-2/+5
| | | | | | | set the correct number of components for src data and the intrinsic Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4908>
* i965: Fix out-of-bounds access to brw_stage_state::surf_offsetDanylo Piliaiev2020-05-061-23/+29
| | | | | | | | | | | | | | ../src/mesa/drivers/dri/i965/brw_wm_surface_state.c:1378:32: runtime error: index 3503345872 out of bounds for type 'uint32_t [149]' brw_assign_common_binding_table_offsets has the following comment: "Unused groups are initialized to 0xd0d0d0d0 to make it obvious that they're unused but also make sure that addition of small offsets to them will trigger some of our asserts that surface indices are < BRW_MAX_SURFACES." Cc: <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4350>
* zink: lower b2b to b2iErik Faye-Lund2020-05-064-1/+67
| | | | | | | | | | | | | | | Zink requires 1-bit booleans, but this requirement was missed before b2b1s started getting automatically inserted. Let's lower these away, to avoid piglit regressions. Fixes the following piglits: - shaders@glsl-vs-if-bool - spec@!opengl 2.0@vertex-program-two-side Fixes: c217ee8d35f ("nir: Insert b2b1s around booleans in nir_lower_to") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2902 Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4903>
* radv/winsys: do not count visible VRAM buffers twice in the budgetSamuel Pitoiset2020-05-062-17/+33
| | | | | | | | | | | | | | | | | The VRAM size returned to apps is computed as follows: vram_size = real_hw_vram_size - visible_vram_size. Visible VRAM buffers should be counted only in the visible VRAM counter and not twice. Buffers with the NO_CPU_ACCESS flag are known to not be mappable, so they are counted in the VRAM counter. Other buffers, with the CPU_ACCESS flag, or without any of both (imported buffers) are counted in the visible VRAM counter because they are mappable. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4834>
* radv: display an error message if the winsys init failedSamuel Pitoiset2020-05-061-1/+2
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: use a linked list for physical devicesSamuel Pitoiset2020-05-062-52/+69
| | | | | | | | Instead of a static array inside the instance object. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: don't report error with other vendor DRM devicesSamuel Pitoiset2020-05-061-9/+15
| | | | | | | | | Enumeration should just skip unsupported DRM devices. Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: report INITIALIZATION_FAILED when the amdgpu winsys init failedSamuel Pitoiset2020-05-061-1/+1
| | | | | | | | | The driver should be capable if it reaches the winsys initialization. Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: fix a memleak if the physical device initialization failedSamuel Pitoiset2020-05-061-6/+8
| | | | | | | | The disk cache object should be freed. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: rename radv_devices() to radv_enumerate_physical_devices()Samuel Pitoiset2020-05-061-3/+3
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* radv: cleanup radv_CreateInstance()Samuel Pitoiset2020-05-061-35/+22
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* llvmpipe: enable ARB_sample_shadingDave Airlie2020-05-065-4/+19
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add min samples support to the fragment shader.Dave Airlie2020-05-062-27/+82
| | | | | | | This isn't enabled yet until the state gets hooked up Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: enable GL_ARB_shader_texture_image_samplesDave Airlie2020-05-061-1/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/nir: hooks up texture samples queriesDave Airlie2020-05-061-3/+21
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/sample: add num samples query for txqs (v2)Dave Airlie2020-05-064-0/+9
| | | | | | | v2: add false to the existing users (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: enable 4x sample MSAA + texture multisampleDave Airlie2020-05-062-14/+6
| | | | | | | | This enables proper support for 4xMSAA and for texture mulitsample extension. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* drisw: add multisample support to sw dri layer.Dave Airlie2020-05-061-1/+31
| | | | | | | | This allocates the msaa resources like the dri2 layer and adds the flushes Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: don't choose pixel centers for multisampleDave Airlie2020-05-062-2/+4
| | | | | | | | Don't pick the pixel centers for multisample rendering, fix the setup program. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: choose correct position for multisampleDave Airlie2020-05-061-7/+8
| | | | | | | | For multisample we don't want pixel centers at this stage, so don't add them in for that case. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: choose multisample rasterizer functions per triangle (v2)Dave Airlie2020-05-061-21/+41
| | | | | | | | | This just picks the correct cmds to add to the scene. v2: drop using 32-bit ms (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: generate multisample triangle rasterizer functions (v2)Dave Airlie2020-05-064-3/+142
| | | | | | | | | | | | | This uses the templating to generate multisample version of the tri plane raster functions This doesn't generate any optimised version for lower plane numbers, maybe this is worth doing in the future. v2: drop generating 32-bit msaa (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: fixup multisample coverage masks for covered tilesDave Airlie2020-05-062-2/+10
| | | | | | | For fully covered tiles just pass in the filled out mask. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: build 64-bit coverage mask in rasterizerDave Airlie2020-05-061-2/+23
| | | | | | | | This adds the logic to build the per-sample masks at the lowest level of the rasterizer block hierarchy Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add fixed point sample positions to scene.Dave Airlie2020-05-062-0/+9
| | | | | | | These will be used in the rasterizer to generate the coverage masks Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add new rast api to pass full 64-bit mask.Dave Airlie2020-05-062-7/+21
| | | | | | | The 64-bit mask is a 16-bit mask per sample for up to 4 samples. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: disable opaque variant for multisampleDave Airlie2020-05-061-0/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: fix multisample occlusion queries.Dave Airlie2020-05-061-7/+8
| | | | | | | | This needs to check the per-sample mask inside the loop if multisample is enabled. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: move color storing earlier in frag shaderDave Airlie2020-05-061-23/+24
| | | | | | | | Move the color storage before the late Z test as for sample shading it needs to be inside a loop with the fragment shader. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: pass mask store into interp for centroid interpolationDave Airlie2020-05-061-1/+1
| | | | | | | | This enables centroid interpolation to work, using the current coverage masks. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: don't allow branch to end for early Z with multisampleDave Airlie2020-05-061-1/+1
| | | | | | | | Don't allow the branching optimisation with multisample enabled as we have to check all samples. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: handle gl_SampleMask writing.Dave Airlie2020-05-061-6/+25
| | | | | | | This is using a load/store to make it easier to add sample shading later. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add multisample alpha to one supportDave Airlie2020-05-061-1/+10
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add multisample alpha to coverage support.Dave Airlie2020-05-061-3/+35
| | | | | | | Converts alpha into coverage mask. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: hook up sample position system valueDave Airlie2020-05-061-1/+26
| | | | | | | | | This creates a global static with the current sample positions, and passes it to the fragment shader which uses it for interpolation and sample position support. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: handle multisample color stores.Dave Airlie2020-05-061-12/+35
| | | | | | | | | | | Extract the final per-sample masks and store to the multisample color buffers using them. This retypes the pointer to a uint8_t at entry to make the GEP simpler, then recasts to the blend type. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: interpolate Z at sample points for early depth test.Dave Airlie2020-05-063-7/+14
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: handle multisample early depth test/late depth writeDave Airlie2020-05-061-0/+41
| | | | | | | | | | A set of values have to be passed from the early depth test to the late depth write, when multisampling is enabled, a range of those values have to be stored between stages, so create storage for them and pass the values through the storage. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: multisample sample mask + early/late depth passDave Airlie2020-05-061-25/+142
| | | | | | | | | | | | | | | | Start adding support for multisample masks and the depth passes The depth passes have to run per-sample, this isn't complete support it adds the loops, and handles the execution masks. One mask is stored per sample, they are combined post the early Z pass into a single shader execution mask, and then the resulting shader execution mask is anded back in for the late Z pass. Init the vars to NULL to avoid gcc warnings Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: move some fs code aroundDave Airlie2020-05-061-10/+9
| | | | | | | this just moves the num_fs loop around for follow on refactors Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add per-sample depth/stencil testDave Airlie2020-05-063-6/+22
| | | | | | | | | | The current depth stencil test code has some optimisations using the mask when there is only one depth value, multisample requires per-sample zstencil testing, and for that case just pass in the mask that needs updating. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: move getting mask value out of depth code. (v2)Dave Airlie2020-05-063-7/+5
| | | | | | | | | | In order to add per-sample support to this code, the mask value is needed not the value from the exec mask. v2: update comment Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add per-sample interpolation.Dave Airlie2020-05-063-6/+17
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add centroid interpolation support.Dave Airlie2020-05-063-7/+65
| | | | | | | This just adds the implementation and API to the interpolation builders. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: pass interp location into interpolation code.Dave Airlie2020-05-063-1/+6
| | | | | | | | This just tracks the attribute interpolation location into the interp code. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* nir/tgsi: translate the interp locationDave Airlie2020-05-061-0/+5
| | | | | | | translate sample and centroid locations. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm: add mask api to force maskDave Airlie2020-05-062-0/+14
| | | | | | | | | | For per-sample shading the mask needs to be forced for each iteration of the fragment shader. Just adds the API for now. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>