History log of /external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5f0e4c7c798827950e835d40912024480ec6d665 29-Nov-2016 Jason Ekstrand <jason.ekstrand@intel.com> i965: Delete the meta-base CopyImageSubData implementation

When I originally implemented the ARB_copy_image extension, the fast-path
was written in meta using texture views. This path only worked if both
images were uncompressed color images. All of the other cases fell back to
the blitter or, in the worst case, mapping and memcpy on the CPU. Now that
we have the blorp path, it handles all copies ever and the old meta,
blitter, and CPU paths are only used on gen5 and below. The primary reason
why we needed the meta path (apart from having a slow blitter on later
hardware) was to handle multisampling which gen5 and earlier don't support
anyway. Since the blitter is reasonably fast on gen5, we can just delete
the meta path and get rid of all that terrible code.

If we decide that we're ok with just disabling ARB_copy_image on gen5 and
earlier (I personally am), then we could get rid of another 300 lines or so
of semi-hairy code.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
06d864921ee6cfd083ac3782d4434d91ec652eea 01-Dec-2016 Jason Ekstrand <jason.ekstrand@intel.com> i965/copy_image: Re-implement the blitter path with emit_miptree_blit

By using emit_miptree_blit which does chunking, this fixes the blitter path
for the case where the image is too tall to blit normally. We also pull it
into intel_blit as intel_miptree_copy. This matches the naming of the
blorp blit and copy functions brw_blorp_blit and brw_blorp_copy.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "13.0" <mesa-dev@lists.freedesktop.org>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
12010b92263dd63a6cef785c730ff877f7912cc8 10-Jun-2016 Topi Pohjolainen <topi.pohjolainen@intel.com> i965: Add new interface for full color resolves

Upcoming patches will introduce fast clear in level/layer
granularity like the driver does already for depth/hiz. This patch
introduces equivalent full resolve option.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
a1e49be71360a5a6124b5e7911b98d1887911e41 09-Sep-2016 Jason Ekstrand <jason.ekstrand@intel.com> i965: Use blorp_copy for all copy_image operations on gen6+

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
88a630121dbcb65ff7a87ebdeb5d916e977a64f0 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Implement a BLORP path for CopyImage and prefer it over Meta.

We're dropping Meta in favor of BLORP everywhere we can.

This also fixes bugs when copying cubemaps to 2D, which is currently
broken in the meta pass. BLORP just works.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94198
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
2822c8a0780ed57f8174389184740251dc5b0eda 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Make the CopyImage BLT path bail for stencil images.

The BLT can't handle S8 because it's W-tiled (at least without
additional funny business, and I'm not sure we care). Disallow
it so it falls back to the CPU path, which works.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
c51702bdc81b65396a7945d2cb30e0576e4aa59a 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Also copy stencil miptree data.

The Meta path handles this, but the CPU/BLT fallbacks did not.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
45d6818021409f61ccbbd92faa3d2af35499509f 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Make a helper function for CopyImage of a miptree.

Currently, it only contains the BLT/CPU fallbacks, so the name is a bit
too generic. But eventually this will use BLORP as well, at which point
the name will make more sense.

The next patch will introduce a second call.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
2dc98d9a15ba2ca48e6e50f2232f4a9fcd4c312f 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Combine src/dest tex vs. rb checks in intel_copy_image_sub_data.

This simplifies things a little - now we only have one (tex or rb?)
if-ladder for src, and a second for dst, rather than four.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
1b39c5efcabb7c4676c57ddc01d37edcce0f2d03 20-May-2016 Kenneth Graunke <kenneth@whitecape.org> i965: Account for MinLayer in CopyImageSubData's blitter/CPU paths.

Fixes Piglit's arb_copy_image-texview test with the Meta path disabled
(so we hit the blitter/CPU fallback paths).

v2: Add MinLayer even for cube maps (suggested by Ilia).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
4ba47f7b2adf71ed100cd390a1a9fbd4434e896a 12-Mar-2016 Anuj Phogat <anuj.phogat@gmail.com> i965: Fix assert conditions for src/dst x/y offsets

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
f709a0845792540544982740fa47be672825ee8a 08-Dec-2015 Topi Pohjolainen <topi.pohjolainen@intel.com> i965: Add means for limiting color resolves

Until now there has been only one type of color buffer that needs
to resolved - namely single sampled fast clear. As even the
sampler engine in GPU doesn't understand the associated meta data,
the color values need to be always resolved prior to reading them.

From SKL onwards there is new scheme supported called the lossless
compression of single sampled color buffers. This is something that
is understood by the sampling engine and therefore resolving of
these types of buffers is not necessary before sampling.
This patch adds means to make the distinction when considering if
resolve is needed.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
088280e022bca10c3712dfa6f8e0ff343a37ce77 07-Feb-2016 Ben Widawsky <benjamin.widawsky@intel.com> i965: Make sure we blit a full compressed block

This fixes an assertion failure in [at least] one of the Unreal Engine Linux
demo/games that uses DXT1 compression. Specifically, the "Vehicle Game".

At some point, the game ends up trying to blit mip level whose size is 2x2,
which is smaller than a DXT1 block. As a result, the assertion in the blit path
is triggered. It should be safe to simply make sure we align the width and
height, which is sadly an example of compression being less efficient.

NOTE: The demo seems to work fine without the assert, and therefore release
builds of mesa wouldn't stumble over this. Perhaps there is some unnoticeable
corruption, but I had trouble spotting it.

Thanks to Jason for looking at my backtrace and figuring out what was going on.

v2: Use NPOT alignment to make sure ASTC is handled properly (Ilia)
Remove comment about how this doesn't fix other bugs, because it does.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93358
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
a4734b34b3928ca6150b8d93f402da54ed69e6e7 29-Sep-2015 Jason Ekstrand <jason.ekstrand@intel.com> i965/copy_image: Fix a copy+past error

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
200aee424790f3167fcb175f4798af27783fe364 28-Aug-2015 Brian Paul <brianp@vmware.com> mesa: rework Driver.CopyImageSubData() and related code

Previously, core Mesa's _mesa_CopyImageSubData() created temporary textures
to wrap renderbuffer sources/destinations. This caused a bit of a mess in
the Mesa/gallium state tracker because we had to basically undo that
wrapping.

Instead, change ctx->Driver.CopyImageSubData() to take both gl_renderbuffer
and gl_texture_image src/dst pointers (one being null, the other non-null)
so the driver can handle renderbuffer vs. texture as needed.

For the i965 driver, we basically moved the code that wrapped textures
around renderbuffers from copyimage.c down into the met and driver code.

The old code in copyimage.c also made some questionable calls to
_mesa_BindTexture(), etc. which weren't undone at the end.

v2 (Jason Ekstrand): Rework the intel bits
v3 (Brian Paul): Update the temporary st_CopyImageSubData() function.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
a6877341358e1534e74dd9e5fc72934a20b78228 21-May-2015 Nanley Chery <nanley.g.chery@intel.com> i965: change the meaning of cpp for compressed textures

An ASTC block takes up 16 bytes for all block width and height configurations.
This size is not integrally divisible by all ASTC block widths. Therefore cpp
is changed to mean bytes per block if the texture is compressed.

Because the original definition was bytes per block divided by block width, all
references to the mipmap width must be divided the block width. This keeps the
address calculation formulas consistent. For example, the units for miptree_level
x_offset and miptree total_width has changed from pixels to blocks.

v2: reuse preexisting ALIGN_NPOT macro located in an i965 driver file.
v3: move ALIGN_NPOT into seperate commit.
simplify cpp assignment in copy_image_with_blitter().
update miptree width and offset variables in: intel_miptree_copy_slice(),
intel_miptree_map_gtt(), and brw_miptree_layout_texture_3d().

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
412c8c8e7eaeec2763bb21a30626544b5a711cb2 15-Apr-2015 Anuj Phogat <anuj.phogat@gmail.com> i965/gen9: Add XY_FAST_COPY_BLT support to intelEmitCopyBlit()

This patch enables using XY_FAST_COPY_BLT only for Yf/Ys tiled buffers.
It can be later turned on for other tiling patterns (X,Y) too.

V3: Flush in between sequential fast copy blits.
Fix src/dst alignment requirements.
Make can_fast_copy_blit() helper.
Use ffs(), is_power_of_two()
Move overlap computation inside intel_miptree_blit().

V4: Use _mesa_regions_overlap() function.
Add check for src_buffer == dst_buffer.
Simplify horizontal and vertical alignment computations.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
aebcf26d8219cee79da89313124c2147595a660c 19-Nov-2014 Chad Versace <chad.versace@linux.intel.com> i965: Fix intel_miptree_map() signature to be more 64-bit safe

This patch should diminish the likelihood of pointer arithmetic overflow
bugs, like the one fixed by b69c7c5dac.

Change the type of parameter 'out_stride' from int to ptrdiff_t. The
logic is that if you call intel_miptree_map() and use the value of
'out_stride', then you must be doing pointer arithmetic on 'out_ptr'.
Using ptrdiff_t instead of int should make a little bit harder to hit
overflow bugs.

As a side-effect, some function-scope variables needed to be retyped to
avoid compilation errors.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
d11bc9fe8daf097741713cde6bdd79e1f0e0e8fc 19-Nov-2014 Chad Versace <chad.versace@linux.intel.com> i965: Remove spurious casts in copy_image_with_memcpy()

If a pointer points to raw, untyped memory and is never dereferenced,
then declare it as 'void*' instead of casting it to 'void*'.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
11ee9a4d99fd68be4c09341225e7faeff70d1b9b 03-Sep-2014 Jason Ekstrand <jason.ekstrand@intel.com> i965/copy_image: Divide the x offsets by block width when using the blitter

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.3" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
499acf6e4a758be74dc5813a8c174da4360e046d 03-Sep-2014 Jason Ekstrand <jason.ekstrand@intel.com> i965/copy_image: Use the correct block dimension

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.3" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
fcb6d5b9ef0d3559fa213c673ed996f194f56c2a 01-Sep-2014 Jason Ekstrand <jason.ekstrand@intel.com> i965/copy_image: Use the correct texture level

Previously, we were using the source images level for both source and
destination. Also, we weren't taking the MinLevel from a potential texture
view into account. This commit fixes both problems.

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.3" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82804
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c
410fea8dd9cc0b1b500477a8b6f68c950f7c895a 28-Jun-2014 Jason Ekstrand <jason.ekstrand@intel.com> i965: Add support for ARB_copy_image

This, together with the meta path, provides a complete implemetation of
ARB_copy_image.

v2: Add a fallback memcpy path for when the texture is too big for the
blitter
v3: Properly support copying between two places on the same texture in the
memcpy fallback
v4: Properly handle blit between the same two images in the fallback path
v5: Properly handle blit between the same two compressed images in the
fallback path
v6: Fix a typo in a comment

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
/external/mesa3d/src/mesa/drivers/dri/i965/intel_copy_image.c