summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* swr: [rasterizer core] clamp scissor rects to current tile rectTim Rowley2016-08-171-0/+18
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] align stats structuresTim Rowley2016-08-171-2/+2
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] use AVX2 permute to simplify PaTriListTim Rowley2016-08-171-1/+35
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] move some global variables to SWR_CONTEXTTim Rowley2016-08-172-9/+9
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] change scale on VP matrix element gathersTim Rowley2016-08-171-6/+6
| | | | | | | Was 1, which led to pulling denorms for non-zero indices. Changed to sizeof(float). Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer] implementing native AVX-512 simd16 intrinsicsTim Rowley2016-08-172-84/+265
| | | | Signed-off-by: Tim Rowley <[email protected]>
* i965/blorp: Use nir_alu_type for the texture data typeJason Ekstrand2016-08-172-27/+16
| | | | | | This lets us remove the brw_reg.h include Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: brw_blorp_blit.cpp -> blorp_blit.cJason Ekstrand2016-08-172-6/+6
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: brw_blorp_clear.cpp -> blorp_clear.cJason Ekstrand2016-08-172-5/+1
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Split brw_blorp.c/h into multiple filesJason Ekstrand2016-08-1711-1373/+1495
| | | | | | | | | | | This mega-commit pulls most of the i965-specific bits of blorp into the brw_blorp.c/h files which now contain nothing but i965 wrappers around "core blorp" calls. The "core blorp" api is moved into blorp.h and the internal blorp data structures are moved into blorp_priv.h. The new file blorp.c is created to house "core blorp" internals which are pulled from the old brw_blorp.c Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Factor the guts of blorp_hiz_exec into a helperJason Ekstrand2016-08-171-18/+25
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Break the guts of do_single_blorp_clear into two helpersJason Ekstrand2016-08-171-64/+111
| | | | | | | | The helpers are completely miptree-unaware and each fairly cleanly do a single thing. This does come at the downside of not doing proper debug reporting on whether or not we're doing replicated clears. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta_util: Convert get_fast_clear_rect to take an isl_surfJason Ekstrand2016-08-173-14/+17
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/clear: Move isl_surf setup higher in the functionJason Ekstrand2016-08-171-10/+10
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Refactor fast-clear logic a bitJason Ekstrand2016-08-171-12/+13
| | | | | | | | | This pulls the mcs allocation into the if statement where we initially determine that we are doing a fast clear and moves the programming of wm_inputs and figuring out the fast clear rect into it's own if statement. The next commit will put code inbetween the two. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/clear: Stop stomping the destination formatJason Ekstrand2016-08-171-3/+1
| | | | | | | The blorp_surface_info_init call above should set the format for us and stomping it later does nothing whatsoever. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta_util: Only modify the input parameters in get_fast_clear_rectJason Ekstrand2016-08-173-13/+4
| | | | | | | | We had another inline copy of brw_meta_get_buffer_rect embedded in get_fast_clear_rect for no good reason. This lets us get rid of the gl_frameuffer parameter to get_fast_clear_rect. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Stop calling brw_meta_get_buffer_rectJason Ekstrand2016-08-173-24/+0
| | | | | | | | We already have an inlined version of the function slightly higher up in do_single_blorp_clear and all calling it does is stomp the values with the same thing. We might as well just get rid of it. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Pull the guts of resolve_color into a miptree-agnostic helperJason Ekstrand2016-08-171-18/+25
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/meta_util: Convert get_resolve_rect to use ISLJason Ekstrand2016-08-173-28/+28
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Make the guts of brw_blorp_blit_miptrees miptree-unawareJason Ekstrand2016-08-172-19/+53
| | | | | | | | | Now that we have the brw_blorp_surf struct, we can start to make bits of blorp completely miptree-unaware. To start things off, we split the guts of brw_blorp_blit_miptrees into a brw_blorp_blit function which knows nothing about miptrees. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add a new brw_blorp_surf intermediate structJason Ekstrand2016-08-174-99/+188
| | | | | | | | At the moment, this seems to make all of the interfaces messier rather than clener. However, it does provide a representation of a surface that simultaneously contains everything and is completely unaware of miptrees. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use the isl_surf for more params setupJason Ekstrand2016-08-171-58/+21
| | | | | | | | The isl_surf munging doesn't happen until fairly late in the blorp_blit function. We can use the isl_surf for the vast majority if not all of our params setup. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Do gen6 stencil offsets up-frontJason Ekstrand2016-08-173-86/+34
| | | | | | | | This keeps all of the nastyness of gen6 stencil on the i965 side of the API line and lets us delete that nasty hand-rolled ISL-based offset path that we were using for ALL_SLICES_AT_EACH_LOD. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Set up HiZ surfaces up-frontJason Ekstrand2016-08-174-32/+65
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i964/blorp: Set up most aux surfaces up-frontJason Ekstrand2016-08-172-23/+28
| | | | | | | | | This commit also adds support for an offset for aux surfaces. In GL, this only gets used for HiZ on SNB at the moment. However, in Vulkan, all aux surfaces are at a non-zero offset and that is likely to happen in GL eventually. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Stop using the miptree in state setup for tex/rt surfacesJason Ekstrand2016-08-176-50/+45
| | | | | | | | | | This commit movies us from a miptree model to a surf+bo+offset model. In the GL driver, miptrees are almost always at the start of the bo so the offset is zero but we don't want to always make that assumption. In the sort term, gen6 stencil and HiZ will be at an offset but, in the long term, any Vulkan surface is liable to be at a non-zero offset. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp/blit: Move format work-arounds before surface_info_initJason Ekstrand2016-08-171-11/+12
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Add real support for HiZJason Ekstrand2016-08-171-13/+28
| | | | | | | | The previous HiZ support was bogus because all of get_aux_isl_surf looked at mt->mcs_mt directly. For HiZ buffers, you need to look at either mt->hiz_buf or mt->hiz_buf->mt. Reviewed-by: Topi Pohjolainen <[email protected]>
* isl/state: Only set clear color if aux is usedJason Ekstrand2016-08-171-25/+27
| | | | | | | Otherwise, the clear color will get ignored. This prevents assertion errors if clear color is set to something invalid and aux is not used. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Use the isl helpers for creating aux surfacesJason Ekstrand2016-08-171-46/+9
| | | | | | | | | | | In order for the calculations of things such as fast clear rectangles to work, we need more details of the auxiliary surface to be correct. In particular, we need to be able to trust the width and height fields. (These are not necessarily what you want coming out of the miptree.) The only values state setup really cares about are the row and array pitch and those we can safely stomp from the miptree. Reviewed-by: Topi Pohjolainen <[email protected]>
* isl: Add helpers for creating different types of aux surfacesJason Ekstrand2016-08-172-0/+136
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Use mcs_mt->qpitch for aux surfacesJason Ekstrand2016-08-171-1/+2
| | | | | | | At one point, we were doing this correctly. It must have gotten lost in one of the many rebases. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Allow get_aux_isl_surf when there is no aux surfaceJason Ekstrand2016-08-171-1/+2
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Support depth in get_isl_clear_colorJason Ekstrand2016-08-171-1/+6
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* isl/state: Add an assertion for IVB multisample array texturesJason Ekstrand2016-08-171-0/+13
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* isl: Add a #define for DEV_IS_BAYTRAILJason Ekstrand2016-08-171-0/+4
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Remove unused fields from blorp_surface_infoJason Ekstrand2016-08-172-19/+0
| | | | | | | The only reason why we need layer or level is that we need the z-offset for 3-D surfaces. Let's just have the one field for that. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Simplify depth buffer state setup a bitJason Ekstrand2016-08-172-55/+17
| | | | | | | The data comes in via ISL in a format that's almost directly usable by the hardware so we can avoid some of the conversion headache. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use the generic surface state path for gen8 texturesJason Ekstrand2016-08-174-48/+8
| | | | | | | Now that the generic blorp path uses base level/layer, there's no need to make gen8 special. Reviewed-by: Topi Pohjolainen <[email protected]>
* isl: Add asserts for gen8+ X/YOffset rulesJason Ekstrand2016-08-171-0/+10
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Only do offset hacks for fake W-tiling and IMSJason Ekstrand2016-08-173-114/+153
| | | | | | | | | | | | | Since the dawn of time, blorp has used offsets directly to get at different mip levels and array slices of surfaces. This isn't really necessary since we can just use the base level/layer provided in the surface state. While it may have simplified blorp's original design, we haven't been using the blorp path for surface state on gen8 thanks to render compression and there's really no good need for it most of the time. This commit restricts such surface munging to the cases of fake W-tiling and fake interleaved multisampling. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Add a z_offset field to blorp_surface_infoJason Ekstrand2016-08-173-9/+14
| | | | | | | The layer field is in terms of physical layers which isn't quite what the sampler will want for 2-D MS array textures. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Pass the Z component into all texture operationsJason Ekstrand2016-08-171-42/+35
| | | | | | | | Multisample array surfaces on IVB don't support the minimum array element surface attribute so it needs to come through the sampler message. We may as well just pass it through everything. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Rework hiz rect alignment calculationsJason Ekstrand2016-08-171-8/+15
| | | | | | | | | | | | At the moment, the minify operation does nothing because params.depth.view.base_level is always zero. However, as soon as we start using actual base miplevels and array slices, we are going to need the minification. Also, we only need to align the surface dimensions in the case where we are operating on miplevel 0. Previously, it didn't matter because it aligned on miplevel 0 and, for all other miplevels, the miptree code guaranteed that the level was already aligned. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Map 1-D render targets with DIM_LAYOUT_GEN4_2D as 2D on gen9Jason Ekstrand2016-08-171-0/+6
| | | | | | | | | The sampling hardware can handle them ok. It just looks at the tiling to determine whether it's the new gen9 1-D layout or the old one. The render hardware isn't so smart. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Fill out the isl_surf::usage fieldJason Ekstrand2016-08-171-1/+24
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* isl: Take the slice0_extent shortcut for interleaved MSAAJason Ekstrand2016-08-171-1/+1
| | | | | | The shortcut works just fine for MSAA and the comment even says so. Reviewed-by: Nanley Chery <[email protected]>
* isl: Remove duplicate px->sa conversionsJason Ekstrand2016-08-171-20/+0
| | | | | | | | In all three cases, we start with width and height taken from isl_surf::phys_slice0_extent_sa which is already in samples. There is no need to do the conversion and doing so gives us an incorrect value. Reviewed-by: Nanley Chery <[email protected]>
* i965/blorp: Use the isl_view from the blorp_surface_infoJason Ekstrand2016-08-171-17/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>