summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* anv: Get rid of some unused function declarationsJason Ekstrand2017-07-221-7/+0
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Enable regular fast-clears (CCS_D) on gen9+Jason Ekstrand2017-07-226-59/+45
| | | | | | | | | | | | | | | The set of formats which supports CCS_E is actually fairly small on gen9. However, everything that supports fast-clears on gen8 also supports fast-clears on gen9+. The one very annoying exception is that blending is broken for non-0/1 clear colors with sRGB formats. In order to solve that problem, we do a resolve to get rid of the clear color. Another option would be to just not fast-clear with non-0/1 clear colors however non-0/1 + blending + sRGB is uncommon enough that this shouldn't be a significant performance problem. This appears to help gl_manhattan31_off by about 2%. Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl: Add a helper for determining if a color is 0/1Jason Ekstrand2017-07-222-0/+30
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Allow blorp_copy on sRGB formatsJason Ekstrand2017-07-221-2/+16
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Weaken the texture view rules for formats slightlyJason Ekstrand2017-07-221-1/+18
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl/format: Add an srgb_to_linear helperJason Ekstrand2017-07-222-1/+53
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl/format: Dedent the template in gen_format_layout.pyJason Ekstrand2017-07-221-58/+57
| | | | | | | This makes it much easier to edit the template and doesn't really dirty the python all that much. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/surface_state: Get the aux usage from the miptree codeJason Ekstrand2017-07-221-95/+13
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/surface_state: Take an isl_aux_usage in emit_surface_stateJason Ekstrand2017-07-221-26/+47
| | | | | | | | This commit replaces the generic "flags" parameter with a more explicit aux usage parameter. This leads to a lot of duplicated code at the moment but this will all get cleaned up directly. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Take an isl_format in prepare_textureJason Ekstrand2017-07-223-12/+13
| | | | | This will be a bit more convenient momentarily. It's also more correct because it makes prepare_texture take sRGB into account.
* i965/miptree: Use miptree range helpers in has_color_unresolvedJason Ekstrand2017-07-221-43/+38
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Allow for accessing a CCS_E image as CCS_DJason Ekstrand2017-07-221-9/+27
| | | | | | | | This requires us to start using the partial clear state. It makes things quite a bit more complicated but it's still a fairly straightforward exercise in diagram following. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Use ISL_AUX_STATE_PARTIAL_CLEAR for CCS_DJason Ekstrand2017-07-221-5/+5
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl: Add an aux state for "partial clear"Jason Ekstrand2017-07-222-35/+65
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Take an aux_usage in prepare/finishJason Ekstrand2017-07-224-60/+80
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Refactor some things to use mt->aux_usageJason Ekstrand2017-07-221-37/+56
| | | | | | | Now that we have this field, it's much easier to switch on it than to walk an if ladder that checks different things. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use prepare/finish_depth for depth clearsJason Ekstrand2017-07-221-36/+21
| | | | | | | We also simplify the way we handle stencil since we know a priori that it will have ISL_AUX_USAGE_NONE. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use render_aux_usage for color clearsJason Ekstrand2017-07-221-12/+6
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Be more accurate about aux usage in blorp_copyJason Ekstrand2017-07-221-13/+42
| | | | | | | | The only real change here is that we now reject clear colors for MCS with certain formats on gen < 9 because we can't trust that the reinterpretation will work. This may cause some MCS partial resolves. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use texture/render_aux_usage for blitsJason Ekstrand2017-07-221-16/+16
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Do prepare/finish manuallyJason Ekstrand2017-07-221-38/+92
| | | | | | | | | | | Our attempts to do it automatically are problematic at best. In order to really be precise, we need to know both the desired aux usage and whether or not clear is supported. The current automatic mechanism doesn't cover this. This commit itself is not a functional change since it just reworks everything to be in terms of a silly helper. Later commits will switch things over to more sensible ways of choosing usage. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Rework prepare/finish_render to be in terms of aux_usageJason Ekstrand2017-07-223-20/+59
| | | | | | | | We keep the old and possibly broken method of determining aux usage intact for now. Therefore, the only functional change here is that we may call finish_render a bit more accurately. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Add a helper for getting the aux usage for texturingJason Ekstrand2017-07-222-20/+43
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Partially resolve MCS for texture viewsJason Ekstrand2017-07-221-7/+7
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Add support for partially resolving MCSJason Ekstrand2017-07-223-3/+67
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Tighten up finish_mcs_writeJason Ekstrand2017-07-221-7/+8
| | | | | | | Multisample surfaces only have a single miplevel so there's no reason to be passing the extra parameters around. It only leads to confusion. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Make aux_state work in terms of logical layersJason Ekstrand2017-07-221-6/+13
| | | | | | | | | This commit changes layer_range_length to return locical layers and also changes the way we allocate the aux_state field to not allocate extra layers for MCS. This will be important as we're about to start doing significantly more detailed tracking of MCS state. Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add a partial resolve pass for MCSJason Ekstrand2017-07-224-1/+213
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Remove some unneeded restrictionsJason Ekstrand2017-07-222-11/+4
| | | | | | | | intel_miptree_supports_ccs_e should handle the gen >= 9 requirement and there's no reason why we can't do CCS_E on window system buffers so long as we resolve. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/miptree: Stop setting FOR_SCANOUT for renderbuffersJason Ekstrand2017-07-221-2/+1
| | | | | | | Nothing created through intel_miptree_create_for_renderbuffer will ever be exposed externally so there's no need to set FOR_SCANOUT. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Do flushes around depth resolvesJason Ekstrand2017-07-221-78/+72
| | | | | | | | It turns out that if you have rendering in-flight with CCS_E enabled and you go to do a depth resolve without flushing, the CCS data may never hit the memory. Reviewed-by: Topi Pohjolainen <[email protected]>
* i965/blorp: Use the renderbuffer format for clearsJason Ekstrand2017-07-221-1/+9
| | | | | | This fixes the Piglit ARB_texture_views rendering-formats test. Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Predicate fast-clear resolvesNanley Chery2017-07-223-16/+120
| | | | | | | | | | | | | | | Image layouts only let us know that an image *may* be fast-cleared. For this reason we can end up with redundant resolves. Testing has shown that such resolves can measurably hurt performance and that predicating them can avoid the penalty. v2: - Introduce additional resolve state management function (Jason Ekstrand). - Enable easy retrieval of fast clear state fields. v3: Use more descriptive field enums (Jason) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/blorp: Allow BLORP calls to be predicatedNanley Chery2017-07-222-0/+6
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Skip some input attachment transitionsNanley Chery2017-07-221-5/+26
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Stop resolving CCS implicitlyNanley Chery2017-07-223-169/+5
| | | | | | | | | With an earlier patch from this series, resolves are additionally performed on layout transitions. Remove the now unnecessary implicit resolves within render passes. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Transition more color buffer layoutsNanley Chery2017-07-222-28/+169
| | | | | | | | | | | v2: Expound on comment for the pipe controls (Jason Ekstrand). v3: - Cast base_layer to uint64_t to avoid overflow. - Remove "seems" from the pipe control comment. - Fix clamp of layer_count (Jason Ekstrand). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Warn about not enabling CCS_ENanley Chery2017-07-221-5/+7
| | | | | | | | Use the performance warning infrastructure to provide helpful information when testing applications. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Move aux_usage assignment upNanley Chery2017-07-221-32/+30
| | | | | | | | For readability, bring the assignment of CCS closer to the assignment of NONE and MCS. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Always enable CCS_D in render passesNanley Chery2017-07-222-11/+20
| | | | | | | | | | | | The lifespan of the fast-clear data will surpass the render pass scope. We need CCS_D to be enabled in order to invalidate blocks previously marked as cleared and to sample cleared data correctly. v2: Avoid refactoring. v3: Allow CCS_D for subpass resolves. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Disable CCS on gen7 color attachments upfrontNanley Chery2017-07-221-11/+5
| | | | | | | | | The next patch enables the use of CCS_D even when the color attachment will not be fast-cleared. Catch the gen7 case early to simplify the changes required. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Ensure fast-clear values are currentNanley Chery2017-07-221-0/+114
| | | | | | | v2: Rewrite functions, change location of synchronization. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/gpu_memcpy: Add a lighter-weight GPU memcpy functionNanley Chery2017-07-222-0/+45
| | | | | | | | | | | | | | | | We'll be performing a GPU memcpy in more places to copy small amounts of data. Add an alternate function that thrashes less state. v2: - Make a new function (Jason Ekstrand). - Move the #define into the function. v3: - Update the function name (Jason). - Update comments. v4: Use an indirect drawing register as TEMP_REG (Jason Ekstrand). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Restrict fast clears in the GENERAL layoutNanley Chery2017-07-223-0/+40
| | | | | | | | | v2: Remove ::first_subpass_layout assertion (Jason Ekstrand). v3: Allow some fast clears in the GENERAL layout. v4: Remove extra '||' and adjust line break (Jason Ekstrand). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Don't partially fast clear image layersNanley Chery2017-07-221-8/+23
| | | | | | | | v2: Don't pass in the command buffer (Jason Ekstrand). v3: Remove an incorrect assertion and an if condition for gen7. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Initialize the clear values bufferNanley Chery2017-07-221-1/+78
| | | | | | | | | | v2: Rewrite functions. v3 (Jason Ekstrand): - Don't set ResourceMinLOD. - Fix clamp of level_count. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Append CCS/MCS with a fast-clear state bufferNanley Chery2017-07-222-0/+90
| | | | | | | v2: Update comments, function signatures, and add assertions. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Disable CCS if the image doesn't support renderingNanley Chery2017-07-221-0/+15
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/isl: Add surface state clear value informationNanley Chery2017-07-222-0/+13
| | | | | | | | This will be used to load and store clear values from surface state objects. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Transition MCS buffers from the undefined layoutNanley Chery2017-07-223-18/+35
| | | | | | | | v2: Define MCS buffers with any sample count (Jason) Cc: <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Nanley Chery <[email protected]>