mesa.git
8 years agovc4: Move bin CL trailer to job_submit() time.
Eric Anholt [Thu, 8 Sep 2016 21:01:15 +0000 (14:01 -0700)]
vc4: Move bin CL trailer to job_submit() time.

To implement job shuffling, I want to be able to call submit() on specific
jobs, turning vc4_flush() into the context's flush-all-jobs hook.

8 years agovc4: Simplify the DISCARD_RANGE handling
Eric Anholt [Fri, 9 Sep 2016 05:40:44 +0000 (22:40 -0700)]
vc4: Simplify the DISCARD_RANGE handling

It's really just an upgrade to attempting WHOLE_RESOURCE.  Pulling the
logic out caught two bugs in it: We would try to do so on cubemaps (even
though we're only mapping 1 of the 6 slices), and we would break
persistent coherent mappings by trying to reallocate when we shouldn't.

8 years agovc4: Fix incorrect clearing of Z/stencil when cleared separately.
Eric Anholt [Fri, 9 Sep 2016 23:26:02 +0000 (16:26 -0700)]
vc4: Fix incorrect clearing of Z/stencil when cleared separately.

The clear of Z or stencil will end up clearing the other as well, instead
of masking.  There's no way around this that I know of, so if we are
clearing just one then we need to draw a quad.

Fixes a regression in the job-shuffling code, where the clear values move
to the job and don't just have the last clear's value laying around when
you do glClear(DEPTH) and then glClear(STENCIL) separately
(ext_framebuffer_multisample-clear 4 depth)).

This causes regressions in ext_framebuffer_multisample/multisample-blit
depth and ext_framebuffer_multisample/no-color depth, but these were
formerly false positives due to the reference image also being black.  Now
the reference and test images are both being drawn, and it looks like
there's an incorrect resolve of depth during blitting to an MSAA FBO.

8 years agoglsl: add core plumbing for GL_ANDROID_extension_pack_es31a
Ilia Mirkin [Sun, 28 Aug 2016 19:40:19 +0000 (15:40 -0400)]
glsl: add core plumbing for GL_ANDROID_extension_pack_es31a

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agomesa: introduce glPrimitiveBoundingBoxARB entrypoint
Ilia Mirkin [Sun, 28 Aug 2016 23:53:02 +0000 (19:53 -0400)]
mesa: introduce glPrimitiveBoundingBoxARB entrypoint

This requires a bit of rejiggering, since normally ES entrypoints alias
core ones, not vice-versa.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agomesa: add a GLES3.2 enums section, and expose new MS line width params
Ilia Mirkin [Sun, 28 Aug 2016 23:51:45 +0000 (19:51 -0400)]
mesa: add a GLES3.2 enums section, and expose new MS line width params

This also exposes them for ARB_ES3_2_compatibility.

While both specs refer to the new MS line width parameters being
separate from the existing AA line widths, reality begs to differ. It's
the same on all hardware currently supported by mesa. Should hardware
come along that wants these to be different, they're easy enough to
separate out.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoaubinator: Remove bogus "end" parameter in gen_disasm_disassemble()
Sirisha Gandikota [Tue, 13 Sep 2016 23:19:31 +0000 (16:19 -0700)]
aubinator: Remove bogus "end" parameter in gen_disasm_disassemble()

Earlier, the loop pretends to loop over instructions from "start" to "end",
but the callers always pass 8192 for end, which is some huge bogus
value. The real loop termination condition is send-with-EOT or 0. (Ken)

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoaubinator: Make gen_disasm_disassemble handle split sends
Sirisha Gandikota [Tue, 13 Sep 2016 23:19:30 +0000 (16:19 -0700)]
aubinator: Make gen_disasm_disassemble handle split sends

Skylake adds new SENDS and SENDSC opcodes, which should be
handled in the send-with-EOT check. Make an is_send() helper
that checks if the opcode is SEND/SENDC/SENDS/SENDSC (Ken)

v2: Make is_send() much more crispier, Mix declaration and
code to make the code compact (Ken)

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoaubinator: Simplify print_dword_val() method
Sirisha Gandikota [Tue, 13 Sep 2016 23:19:29 +0000 (16:19 -0700)]
aubinator: Simplify print_dword_val() method

Remove the float/dword union and use the iter->p[f->start / 32]
directly as printf formatter %08x expects uint32_t (Ken)

v2: Make the cleanup much more crispier (Ken)

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoanv/image: Set correct base_array_layer and array_len for storage images
Jason Ekstrand [Tue, 13 Sep 2016 21:02:32 +0000 (14:02 -0700)]
anv/image: Set correct base_array_layer and array_len for storage images

Since Vulkan doesn't allow single-slice 3D storage images, we need to just
set the base_array_layer and array_len to the full size of the 3-D LOD.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoRevert "intel/isl: Ignore base_array_layer and array_len for 3D storage..."
Jason Ekstrand [Tue, 13 Sep 2016 19:55:25 +0000 (12:55 -0700)]
Revert "intel/isl: Ignore base_array_layer and array_len for 3D storage..."

This reverts commit 3943888c94beca69e575b8d3d1ec7a6cbf474ee4.  It turns out
that commit was pretty-much bogus since it breaks binding a 3-D texture as a
2-D storage image.  The correct fix for the Vulkan CTS tests needs to be in
the Vulkan driver itself rather than ISL.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: Use blorp for doing MSAA resolves
Jason Ekstrand [Wed, 31 Aug 2016 00:49:56 +0000 (17:49 -0700)]
anv: Use blorp for doing MSAA resolves

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv: Use blorp for ClearColorImage
Jason Ekstrand [Tue, 30 Aug 2016 23:56:25 +0000 (16:56 -0700)]
anv: Use blorp for ClearColorImage

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv: Delete meta_blit2d
Jason Ekstrand [Tue, 30 Aug 2016 23:23:59 +0000 (16:23 -0700)]
anv: Delete meta_blit2d

Everything that we were once using the blit2d framework for is now done
with blorp.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv/blorp: Add a gcd_pow2_u64 helper and use it for buffer alignments
Jason Ekstrand [Sat, 10 Sep 2016 02:21:18 +0000 (19:21 -0700)]
anv/blorp: Add a gcd_pow2_u64 helper and use it for buffer alignments

This is a lot cleaner and easier to read than the old piles of if
statements.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoanv: Use blorp for CopyBuffer and UpdateBuffer
Jason Ekstrand [Tue, 30 Aug 2016 22:43:46 +0000 (15:43 -0700)]
anv: Use blorp for CopyBuffer and UpdateBuffer

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoanv: Use blorp for CopyImage
Jason Ekstrand [Sun, 28 Aug 2016 04:05:13 +0000 (21:05 -0700)]
anv: Use blorp for CopyImage

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoanv: Use blorp for CopyBufferToImage
Jason Ekstrand [Sat, 27 Aug 2016 19:57:01 +0000 (12:57 -0700)]
anv: Use blorp for CopyBufferToImage

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoanv: Use blorp for CopyImageToBuffer
Jason Ekstrand [Wed, 24 Aug 2016 03:19:57 +0000 (20:19 -0700)]
anv: Use blorp for CopyImageToBuffer

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agoanv: Use blorp to implement VkBlitImage
Jason Ekstrand [Tue, 23 Aug 2016 05:33:06 +0000 (22:33 -0700)]
anv: Use blorp to implement VkBlitImage

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv: Make image_get_surface_for_aspect_mask const
Jason Ekstrand [Wed, 31 Aug 2016 00:49:32 +0000 (17:49 -0700)]
anv: Make image_get_surface_for_aspect_mask const

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
8 years agoanv: Add initial blorp support
Jason Ekstrand [Tue, 23 Aug 2016 04:37:28 +0000 (21:37 -0700)]
anv: Add initial blorp support

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/anv: Use #defines for all __gen_ helpers
Jason Ekstrand [Wed, 24 Aug 2016 00:23:29 +0000 (17:23 -0700)]
intel/anv: Use #defines for all __gen_ helpers

This allows us to #undef them later if we don't want them to persist

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoanv: Generalize emit_urb_setup
Jason Ekstrand [Tue, 23 Aug 2016 02:08:33 +0000 (19:08 -0700)]
anv: Generalize emit_urb_setup

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoanv/pipeline: Roll compute_urb_partition into emit_urb_setup
Jason Ekstrand [Sat, 20 Aug 2016 13:11:41 +0000 (06:11 -0700)]
anv/pipeline: Roll compute_urb_partition into emit_urb_setup

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Use #defines for all __gen_ helpers
Jason Ekstrand [Wed, 24 Aug 2016 00:20:34 +0000 (17:20 -0700)]
intel/blorp: Use #defines for all __gen_ helpers

This allows us to #undef them later if we don't want them to persist

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/isl: Divide QPitch by 2 for 3-D stencil textures on SKL+
Jason Ekstrand [Thu, 8 Sep 2016 17:26:15 +0000 (10:26 -0700)]
intel/isl: Divide QPitch by 2 for 3-D stencil textures on SKL+

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agoisl/state: Don't set QPitch for GEN4_3D surfaces
Jason Ekstrand [Thu, 8 Sep 2016 17:23:47 +0000 (10:23 -0700)]
isl/state: Don't set QPitch for GEN4_3D surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agointel/blorp: Rework alloc_binding_table
Jason Ekstrand [Wed, 24 Aug 2016 03:51:26 +0000 (20:51 -0700)]
intel/blorp: Rework alloc_binding_table

The original blorp_alloc_binding_table helper was supposed to return the
binding table offset and map along with the surface state maps.  This isn't
quite what we want, however.  What we really want is the binding table
offsets, surface state offsets, and surface state maps.  In the GL driver,
the binding table map *is* an array of surface state offsets.  However, in
Vulkan, this isn't quite true as the entries in the binding table are
surface state offsets combined with another binding table block offset.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agotgsi/scan: don't set interp flags for inputs only used by INTERP instructions
Marek Olšák [Thu, 8 Sep 2016 17:12:00 +0000 (19:12 +0200)]
tgsi/scan: don't set interp flags for inputs only used by INTERP instructions

radeonsi depends on the interp flags a little bit too much.

This fixes 9 randomly failing tests:
  GL45-CTS.shader_multisample_interpolation.render.interpolate_at_centroid.*

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: fix FP64 UBO loads with indirect uniform block indexing
Marek Olšák [Sun, 11 Sep 2016 23:38:53 +0000 (01:38 +0200)]
radeonsi: fix FP64 UBO loads with indirect uniform block indexing

No known tests.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agowinsys/amdgpu: don't assume GTT if the VRAM flag isn't set
Marek Olšák [Sun, 11 Sep 2016 19:49:24 +0000 (21:49 +0200)]
winsys/amdgpu: don't assume GTT if the VRAM flag isn't set

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: clean up CP DMA emit code
Marek Olšák [Sun, 11 Sep 2016 15:57:31 +0000 (17:57 +0200)]
radeonsi: clean up CP DMA emit code

Unify the clear and copy paths, clean up the definitions.
It looks more like a rework. It's a preparation for GDS support,
which might or might not come.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: print the IB and buffer list in VM fault reports
Marek Olšák [Mon, 12 Sep 2016 18:23:55 +0000 (20:23 +0200)]
radeonsi: print the IB and buffer list in VM fault reports

This is a fallout from reworking the debug flags.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: add sampler view BOs to the BO list last
Marek Olšák [Mon, 12 Sep 2016 10:49:34 +0000 (12:49 +0200)]
radeonsi: add sampler view BOs to the BO list last

If si_sampler_view_add_buffer ends up flushing, then the code
in begin_new_cs would previously have added the buffer(s) for
whatever was previously bound to that slot. Now it would add only
the new buffer.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: export SampleMask from pixel shaders at full rate
Marek Olšák [Fri, 9 Sep 2016 23:21:11 +0000 (01:21 +0200)]
radeonsi: export SampleMask from pixel shaders at full rate

Heaven and Valley write gl_SampleMask and not Z.
Use 16_ABGR instead of 32_ABGR if Z isn't written.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agogallium/radeon: set new r600_resource fields correctly in other places too
Marek Olšák [Mon, 12 Sep 2016 10:47:13 +0000 (12:47 +0200)]
gallium/radeon: set new r600_resource fields correctly in other places too

This was missed in:

    commit 0d2e43fcb1198a6e67c85feadb1ca8c360ddc284
    Author: Marek Olšák <marek.olsak@amd.com>
    Date:   Thu Aug 18 16:30:00 2016 +0200

        gallium/radeon: derive buffer placement and flags only at initialization

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoddebug: dump shader buffers and images
Marek Olšák [Sat, 10 Sep 2016 08:16:54 +0000 (10:16 +0200)]
ddebug: dump shader buffers and images

this was unimplemented

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoddebug: fix a crash in resource_get_handle
Marek Olšák [Sat, 10 Sep 2016 07:50:42 +0000 (09:50 +0200)]
ddebug: fix a crash in resource_get_handle

broken recently

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeon: Don't check DCC on pipe buffers
Jan Vesely [Tue, 13 Sep 2016 00:47:37 +0000 (20:47 -0400)]
radeon: Don't check DCC on pipe buffers

Fixes segfaults in EG compute since:
commit 21de3be8e62b2b093569a99550e6356ed2f106b4
radeonsi: fix texture format reinterpretation with DCC

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agovl/util: Fix YV12/I420 convert to NV12 U/V reversal
Andy Furniss [Tue, 13 Sep 2016 17:52:31 +0000 (13:52 -0400)]
vl/util: Fix YV12/I420 convert to NV12 U/V reversal

Fix VAAPI YV12/I420 convert to NV12 U/V reversal.
Input order is YVU when this is called.

Signed-off-by: Andy Furniss <adf.lists@gmail.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
8 years agoanv/allocator: Use VG_NOACCESS_WRITE in anv_bo_pool_free
Jason Ekstrand [Thu, 8 Sep 2016 04:33:48 +0000 (21:33 -0700)]
anv/allocator: Use VG_NOACCESS_WRITE in anv_bo_pool_free

Previously, we were relying on the fact that VALGRIND_MEMPOOL_FREE came
later on in the function to prevent "link->bo = bo" from causing an invalid
write.  However, in the case where the size requested by the user is very
small (less than sizeof(struct anv_bo)), this isn't sufficient.  Instead,
we should call VALGRIND_MEMPOOL_FREE early and then use VG_NOACCESS_WRITE.
We do, however, have to call VALGRIND_MEMPOOL_FREE after reading bo_in
because it may be stored in the bo itself.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agointel/isl: Ignore base_array_layer and array_len for 3D storage surfaces
Jason Ekstrand [Tue, 13 Sep 2016 05:31:00 +0000 (22:31 -0700)]
intel/isl: Ignore base_array_layer and array_len for 3D storage surfaces

The time we want to restrict the Z range of a 3-D surface is when rendering
to it.  For storage surfaces, we always want he full range.  However, we
still need to set MinimumArrayElement and RenderTargetViewExtent to
sensible values so we'll just set them to the reasonable defaults we used
before we started respecting the base_array_layer and array_len.

This fixes a bunch of Vulkan CTS regressions caused by 48f195d7c6483ed.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97790
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agoappveyor: Update winflexbison download URL.
Jose Fonseca [Tue, 13 Sep 2016 16:53:30 +0000 (17:53 +0100)]
appveyor: Update winflexbison download URL.

This particular version got moved into a `old_versions` subdirectory.

8 years agoi965: Use blorp_copy for all copy_image operations on gen6+
Jason Ekstrand [Fri, 9 Sep 2016 04:34:16 +0000 (21:34 -0700)]
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>
8 years agoi965/blorp: Add a copy_miptrees helper
Jason Ekstrand [Fri, 9 Sep 2016 04:27:01 +0000 (21:27 -0700)]
i965/blorp: Add a copy_miptrees helper

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agointel/isl: Add support for RGB formats in X and Y-tiled memory
Jason Ekstrand [Fri, 9 Sep 2016 05:18:47 +0000 (22:18 -0700)]
intel/isl: Add support for RGB formats in X and Y-tiled memory

Normally, using a non-linear tiling format helps improve cache locality by
ensuring that neighboring pixels are usually close-by in memory.  For RGB
formats, this still sort-of holds, but it can also lead to rather terrible
memory access patterns where a single RGB pixel value crosses a tile
boundary and gets split into two pieces in different 4K pages.  It also
makes for some rather awkward calculations because your tile size is no
longer an even multiple of surface element size.  For these reasons, we
chose to simply never create tiled RGB images in the Vulkan driver.

The GL driver, however, is not so kind so we need to support it somehow.  I
briefly toyed with a couple of different schemes but this is the best one I
could come up with.  The fundamental problem is that a tile no longer
contains an integer number of surface elements.  I briefly considered a
couple other options but found them wanting:

 1) Using floats for the logical tile size.  This leads to potential
    rounding error problems.

 2) When presented with a RGB format, just make the tile 3-times as wide.
    This isn't so nice because now our tiles are no longer power-of-two
    size.  Also, it can force the row_pitch to be larger than needed which,
    while not strictly a problem for ISL, causes incompatibility problems
    with the way the GL driver chooses surface pitches.

The chosen method requires that you pay attention and not just assume that
your tile_info is in the units you think it is.  However, it's nice because
it provides a nice "these are the units" declaration in isl_tile_info
itself.  Previously, the tile_info wasn't usable as a stand-alone structure
because you had to also know the format.  It also forces figuring out how
to deal with inconsistencies between tiling and format back to the caller
which is good because the two different consumers of isl_tile_info really
want to deal with it differently:  Computation of the surface size wants
the fewest number of horizontal tiles possible while get_intratile_offset
is far more concerned with things aligning nicely.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Chad Versace <chadversary@chromium.org>
8 years agointel/isl: Allow valign2 for texture-only Y-tiled surfaces on gen7
Jason Ekstrand [Fri, 9 Sep 2016 15:57:14 +0000 (08:57 -0700)]
intel/isl: Allow valign2 for texture-only Y-tiled surfaces on gen7

The restriction that Y-tiled surfaces must have valign == 4 only aplies to
render targets but we were applying it universally.  This causes problems
if ISL_FORMAT_R32G32B32_FLOAT is used because it requires valign == 2; this
should be okay because you can't render to that format.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agointel/blorp: Work in terms of logical array layers
Jason Ekstrand [Sat, 3 Sep 2016 18:40:09 +0000 (11:40 -0700)]
intel/blorp: Work in terms of logical array layers

When Ivy Bridge introduced array multisampling, someone made the decision
to do lots of stuff throughout the driver in terms of physical array layers
rather than logical array layers.  In ISL, we use logical array layers most
of the time and it really makes no sense to use physical array layers in
the blorp API.  Every time someone passes physical array layers into blorp
for an array multisampled surface, they're always divisible by the number
of samples and we divide right away.

Eventually, I'd like to rework most of the GL driver internals to use
logical array layers but that's going to be a big project and will probably
happen as part of the ISL conversion.  For now, we'll do the conversion in
brw_blorp and let blorp just use the logical layers.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Increase the presision of coordinate transform calculations
Jason Ekstrand [Sat, 3 Sep 2016 16:49:24 +0000 (09:49 -0700)]
intel/blorp: Increase the presision of coordinate transform calculations

The result of this calculation goes into an fma() in the shader and we
would like it to be as precise as possible.  The division in particular
was a source of imprecision whenever dst1 - dst0 was not a power of two.
This prevents regressions in some of the new Vulkan CTS tests for blitting
using a filtering of NEAREST.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agointel/blorp: Add a swizzle parameter to blorp_clear
Jason Ekstrand [Wed, 31 Aug 2016 01:01:27 +0000 (18:01 -0700)]
intel/blorp: Add a swizzle parameter to blorp_clear

While we're here, we also re-arrange the parameters to better match the
parameter order of blorp_blit.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Make color_write_disable const and optional
Jason Ekstrand [Tue, 30 Aug 2016 23:55:35 +0000 (16:55 -0700)]
intel/blorp: Make color_write_disable const and optional

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Add support for clearing R9G9B9E5 surfaces
Jason Ekstrand [Tue, 30 Aug 2016 23:32:51 +0000 (16:32 -0700)]
intel/blorp: Add support for clearing R9G9B9E5 surfaces

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Add support for RGB destinations in copies
Jason Ekstrand [Sat, 27 Aug 2016 19:07:31 +0000 (12:07 -0700)]
intel/blorp: Add support for RGB destinations in copies

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Add an entrypoint for doing bit-for-bit copies
Jason Ekstrand [Tue, 30 Aug 2016 20:13:43 +0000 (13:13 -0700)]
intel/blorp: Add an entrypoint for doing bit-for-bit copies

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Pull the guts of blorp_blit into a helper
Jason Ekstrand [Tue, 30 Aug 2016 19:49:54 +0000 (12:49 -0700)]
intel/blorp: Pull the guts of blorp_blit into a helper

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Stop using the X/YOffset field of RENDER_SURFACE_STATE
Jason Ekstrand [Tue, 30 Aug 2016 18:18:39 +0000 (11:18 -0700)]
intel/blorp: Stop using the X/YOffset field of RENDER_SURFACE_STATE

While it can be useful, the field has substantial limtations.  In
particular, the bittom 2 or 3 bits is missing so your offset always has to
be a multiple of 4 or 8.  While surface alignments usually work out to make
this ok, when you start trying to fake compressed surfaces as uncompressed
(which we will want to do) this falls apart.  The easiest solution is to
simply align all offsets to a tile boundary and munge the regions we're
copying to account for the intratile offset.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Use fake_interleaved_msaa in retile_w_to_y
Jason Ekstrand [Tue, 30 Aug 2016 01:05:11 +0000 (18:05 -0700)]
intel/blorp: Use fake_interleaved_msaa in retile_w_to_y

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Use isl_get_interleaved_msaa_px_size_sa
Jason Ekstrand [Tue, 30 Aug 2016 00:52:52 +0000 (17:52 -0700)]
intel/blorp: Use isl_get_interleaved_msaa_px_size_sa

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/isl: Add a helper for getting the size of an interleaved pixel
Jason Ekstrand [Mon, 29 Aug 2016 23:34:06 +0000 (16:34 -0700)]
intel/isl: Add a helper for getting the size of an interleaved pixel

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Handle 3D surfaces in convert_to_single_slice
Jason Ekstrand [Mon, 29 Aug 2016 16:48:10 +0000 (09:48 -0700)]
intel/blorp: Handle 3D surfaces in convert_to_single_slice

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/isl: Fix an assert in get_intratile_offset_sa
Jason Ekstrand [Mon, 29 Aug 2016 16:16:06 +0000 (09:16 -0700)]
intel/isl: Fix an assert in get_intratile_offset_sa

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Fix the early return condition in convert_to_single_slice
Jason Ekstrand [Wed, 31 Aug 2016 19:58:54 +0000 (12:58 -0700)]
intel/blorp: Fix the early return condition in convert_to_single_slice

The convert_to_single_slice operation is *mostly* idempotent.  The only
non-repeatable thing it does is that, when it sets the intratile offset
fields, it just overwrites them instead of doing a += operation.  This is
supposed to be ok because we have an early return at the top that should
make it bail of the surface is already a single slice.  Unfortunately, the
if condition has been broken ever since it was first added in 96fa98c18.
This commit fixes the condition and adds an assert to ensure we don't stomp
any non-zero intratile offsets.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Use the surface format for computing offsets
Jason Ekstrand [Sun, 28 Aug 2016 05:44:15 +0000 (22:44 -0700)]
intel/blorp: Use the surface format for computing offsets

If we use the view format, it may be an uncompressed view of a compressed
image which throws things off.  Since we're computing offsets of images, we
want the actual surface offset anyway.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Don't assume R8_UINT in convert_to_single_slice
Jason Ekstrand [Sun, 28 Aug 2016 05:06:11 +0000 (22:06 -0700)]
intel/blorp: Don't assume R8_UINT in convert_to_single_slice

We're going to use it for more than just stencil textures

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Take a destination swizzle in blorp_blit
Jason Ekstrand [Sun, 28 Aug 2016 04:57:51 +0000 (21:57 -0700)]
intel/blorp: Take a destination swizzle in blorp_blit

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/blorp: Take an isl_swizzle instead of a SWIZZLE
Jason Ekstrand [Sun, 28 Aug 2016 04:48:40 +0000 (21:48 -0700)]
intel/blorp: Take an isl_swizzle instead of a SWIZZLE

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agointel/isl: Add an isl_swizzle structure and use it for isl_view swizzles
Jason Ekstrand [Sun, 28 Aug 2016 04:39:16 +0000 (21:39 -0700)]
intel/isl: Add an isl_swizzle structure and use it for isl_view swizzles

This should be more compact than the enum isl_channel_select[4] that we
were using before.  It's also very convenient because we already had such a
structure in the Vulkan driver we just needed to pull it over.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agodocs: Add OES_tessellation_shader to the release notes.
Kenneth Graunke [Tue, 13 Sep 2016 00:24:35 +0000 (17:24 -0700)]
docs: Add OES_tessellation_shader to the release notes.

8 years agodocs: Mark OES_tessellation_shader as done.
Kenneth Graunke [Tue, 13 Sep 2016 00:23:10 +0000 (17:23 -0700)]
docs: Mark OES_tessellation_shader as done.

8 years agost/mesa: fix is_scissor_enabled when X/Y are negative
Ilia Mirkin [Sun, 11 Sep 2016 17:37:30 +0000 (13:37 -0400)]
st/mesa: fix is_scissor_enabled when X/Y are negative

Similar to commit 49c24d8a24 ("i965: fix noop_scissor range issue on
width/height") - take the X/Y into account to determine whether the
scissor covers the whole area or not.

Fixes the recently-added gl-1.0-scissor-depth-clear-negative-xy piglit
test.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: <mesa-stable@lists.freedesktop.org>
8 years agoandroid: add support for libmesa_amdgpu_addrlib
Mauro Rossi [Mon, 12 Sep 2016 23:15:16 +0000 (01:15 +0200)]
android: add support for libmesa_amdgpu_addrlib

Android porting of the following commits:

f1f1ba3 "radeonsi: move sid.h/r600d_common.h to a common place."
69fca64 "amd/addrlib: move addrlib from amdgpu winsys to common code"

This patch fixes android building errors

Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agou_endian: add android to glibc clause
Dave Airlie [Mon, 12 Sep 2016 01:21:29 +0000 (11:21 +1000)]
u_endian: add android to glibc clause

Tested-by: Mauro Rossi <issor.oruam@gmail.com>
8 years agoRevert "i965: Drop the maximum 3D texture size to 512 on Sandy Bridge"
Jason Ekstrand [Mon, 12 Sep 2016 15:18:53 +0000 (08:18 -0700)]
Revert "i965: Drop the maximum 3D texture size to 512 on Sandy Bridge"

This reverts commit 6ba88bce64b343761aabe3a6c7ee285c6020a959.  The commit
was erroneous because GL has a separate limit, GL_MAX_FRAMEBUFFER_LAYERS
which guards the number of layers you are allowed to render into.

The GL 4.5 spec says:

   "The framebuffer attachment point attachment is said to be framebuffer
   attachment complete if [...] all of the following conditions are true:

      [...]

      If image is a three-dimensional, one- or two-dimensional array, or
      cube map array texture and the attachment is layered, the depth or
      layer count of the texture is less than or equal to the value of the
      implementation-dependent limit MAX_FRAMEBUFFER_LAYERS."

and goes on to say that "framebuffer complete" requires all attachments to
be "framebuffer attachment complete".

On Sandy Bridge, we set GL_MAX_FRAMEBUFFER_LAYERS to 512 so creating a 3D
texture bigger than 512 is fine; you just can't render into all of the
slices at once.

Fixes ES3-CTS.gtf.GL3Tests.npot_textures.npot_tex_image on Sandy Bridge

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
8 years agointel/blorp: Handle the 512 layers restriction on Sandy Bridge
Jason Ekstrand [Mon, 12 Sep 2016 18:46:22 +0000 (11:46 -0700)]
intel/blorp: Handle the 512 layers restriction on Sandy Bridge

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agointel/isl: Treat 3-D textures as 2-D arrays for rendering
Jason Ekstrand [Mon, 12 Sep 2016 15:13:43 +0000 (08:13 -0700)]
intel/isl: Treat 3-D textures as 2-D arrays for rendering

In particular, this means that isl_view::base_array_layer and
isl_view::array_len get applied to 3-D textures but only when rendering.
We were already applying isl_view::base_array_layer for rendering into 3-D
textures so this isn't a huge deviation.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoaubinator: Simplify gen_disasm_create()'s devinfo handling
Sirisha Gandikota [Thu, 8 Sep 2016 23:15:19 +0000 (16:15 -0700)]
aubinator: Simplify gen_disasm_create()'s devinfo handling

Copy the whole devinfo structure instead of just few fields (Ken)

Earlier, copied only couple of fields which added more code. So,
simplify code by copying the whole structure.

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoaubinator: Fix compiler warning
Sirisha Gandikota [Thu, 8 Sep 2016 23:15:18 +0000 (16:15 -0700)]
aubinator: Fix compiler warning

Add 'const' qualifier to gen_field_iterator::p pointer (Ken)

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agost/va: also honors interlaced preference when providing a video format
Julien Isorce [Sat, 3 Sep 2016 08:10:21 +0000 (09:10 +0100)]
st/va: also honors interlaced preference when providing a video format

This fixes a crash when using the prefered video format with vaapisink
on Nvidia hardwares.
Also caught by the following assert:
  nouveau_vp3_video.c:91: Assertion `templat->interlaced' failed.

TEST= gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! vaapisink

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Tested-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tested-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agotgsi: document semantics for compute shaders
Samuel Pitoiset [Sat, 10 Sep 2016 15:10:46 +0000 (17:10 +0200)]
tgsi: document semantics for compute shaders

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agomesa: Enable OES/EXT_tessellation_shader for ES 3.1 + ARB_tess drivers.
Kenneth Graunke [Fri, 8 Jul 2016 18:48:15 +0000 (11:48 -0700)]
mesa: Enable OES/EXT_tessellation_shader for ES 3.1 + ARB_tess drivers.

Drivers which support ARB_tessellation_shader and ES 3.1 now will
expose OES_tessellation_shader and EXT_tessellation_shader as well.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agoradeonsi: don't preload constants at the beginning of shaders
Marek Olšák [Fri, 9 Sep 2016 22:29:31 +0000 (00:29 +0200)]
radeonsi: don't preload constants at the beginning of shaders

LLVM can CSE the loads, thus we can always re-load constants before each
use. The decrease in SGPR spilling is huge.

The best improvements are the dumbest ones.

26011 shaders in 14651 tests
Totals:
SGPRS: 1453346 -> 1251920 (-13.86 %)
VGPRS: 742576 -> 728421 (-1.91 %)
Spilled SGPRs: 52298 -> 16644 (-68.17 %)
Spilled VGPRs: 397 -> 369 (-7.05 %)
Scratch VGPRs: 1372 -> 1344 (-2.04 %) dwords per thread
Code Size: 36136488 -> 36001064 (-0.37 %) bytes
LDS: 767 -> 767 (0.00 %) blocks
Max Waves: 219315 -> 222221 (1.33 %)

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agointel/blorp: Add a TODO file
Jason Ekstrand [Mon, 12 Sep 2016 17:13:52 +0000 (10:13 -0700)]
intel/blorp: Add a TODO file

This provides a nice little place to share notes on what still needs to be
done and/or would be nice to have in BLORP.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: check for GL_TEXTURE_EXTERNAL_OES at miptree_create_for_teximage
Alejandro Piñeiro [Sat, 10 Sep 2016 22:07:30 +0000 (00:07 +0200)]
i965: check for GL_TEXTURE_EXTERNAL_OES at miptree_create_for_teximage

Forgotten on commit "i965: Fix calculation of the image height at start level".

Thanks to Ilia Mirkin for point it.

Fixes the following regressions on Haswell and Broadwell:
ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestSimpleUnassociated (crash back to pass)
ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestSimple (crash back to fail)
ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestVertexShader (crash back to fail)

https://bugs.freedesktop.org/show_bug.cgi?id=97761

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agogbm: fix potential NULL deref of mapImage/unmapImage.
Chuanbo Weng [Tue, 6 Sep 2016 09:28:43 +0000 (17:28 +0800)]
gbm: fix potential NULL deref of mapImage/unmapImage.

The mapImage/unmapImage functions of DRIimage extension can be NULL,
so we should add additional check for them.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoRemove GL_GLEXT_PROTOTYPES guards from non-ext headers.
Emil Velikov [Mon, 12 Sep 2016 12:26:40 +0000 (13:26 +0100)]
Remove GL_GLEXT_PROTOTYPES guards from non-ext headers.

A earlier sync with the Khronos headers added _extension_ prototype
guards to all the GLES2/3/31/32 core entry points. Effectively breaking
all the applications that aim to be portable and do not set the define.

The issue has been reported to Khronos (internal bugzilla #14206) and is
being worked on. Until updated/fixed headers are released locally fix
the issue.

The following report is when building weston.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97773

Cc: Armin Krezović <krezovic.armin@gmail.com>
Cc: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Fixes: 6a5504de2fb ("Update Khronos-supplied headers to r33100")
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agoaubinator: rework print_help()
Emil Velikov [Mon, 12 Sep 2016 11:34:10 +0000 (12:34 +0100)]
aubinator: rework print_help()

Rather than using platform specific methods to retrieve the program
name pass it explicitly. The function is called directly from main().

Similarly - basename comes in two versions POSIX (can modify string,
always pass a copy) and GNU (never modifies the string).

Just printout the complete program name, esp. since the program is not
meant to be installed. Thus using $basename is unlikely to work, not to
mention it is misleading.

Reported-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
8 years agodocs: Note MESA_configless_context as superseded
Adam Jackson [Fri, 9 Sep 2016 16:25:35 +0000 (12:25 -0400)]
docs: Note MESA_configless_context as superseded

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
8 years agoegl: Rename MESA_configless_context bit to KHR_no_config_context
Adam Jackson [Fri, 9 Sep 2016 16:25:34 +0000 (12:25 -0400)]
egl: Rename MESA_configless_context bit to KHR_no_config_context

Keep the old name in the extension string, but refer to the KHR
extension internally.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
8 years agoegl: QueryContext on a configless context returns zero
Adam Jackson [Fri, 9 Sep 2016 16:25:33 +0000 (12:25 -0400)]
egl: QueryContext on a configless context returns zero

MESA_configless_context does not specify the interaction with
QueryContext at all, and the code to generate an error in this case
predates the Mesa extension. Since EGL_NO_CONFIG_{KHR,MESA} are
numerically identical there's no way to distinguish which one the
application asked for, so use the KHR behaviour.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
8 years agost/va: enable vbr rate control for vaapi encode
Boyuan Zhang [Tue, 6 Sep 2016 20:39:45 +0000 (16:39 -0400)]
st/va: enable vbr rate control for vaapi encode

This patch enables variable bit-rate for vaapi encoding. According to va.h,
target bit-rate equals to maximum bit-rate multiplies by target_percentage.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agovl/rbsp: match initial escaped bits with valid in the buffer
Leo Liu [Tue, 6 Sep 2016 17:14:48 +0000 (13:14 -0400)]
vl/rbsp: match initial escaped bits with valid in the buffer

Otherwise the check for the three byte will not make sense.

Signed-off-by: Leo Liu <leo.liu@amd.com>
8 years agoegl: fix gcc warning braces around scalar initializer
Timothy Arceri [Sun, 11 Sep 2016 23:24:00 +0000 (09:24 +1000)]
egl: fix gcc warning braces around scalar initializer

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
8 years agowinsys/radeon: rename nrelocs, crelocs to max_relocs, num_relocs
Nicolai Hähnle [Fri, 9 Sep 2016 16:53:22 +0000 (18:53 +0200)]
winsys/radeon: rename nrelocs, crelocs to max_relocs, num_relocs

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/radeon: don't pre-allocate the relocations array
Nicolai Hähnle [Fri, 9 Sep 2016 16:50:34 +0000 (18:50 +0200)]
winsys/radeon: don't pre-allocate the relocations array

It's really not necessary. Switch to an exponential resizing strategy.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/radeon: remove unused radeon_cs_context::priority_usage
Nicolai Hähnle [Fri, 9 Sep 2016 13:34:08 +0000 (15:34 +0200)]
winsys/radeon: remove unused radeon_cs_context::priority_usage

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/amdgpu: remove amdgpu_cs_lookup_buffer
Nicolai Hähnle [Thu, 8 Sep 2016 07:31:53 +0000 (09:31 +0200)]
winsys/amdgpu: remove amdgpu_cs_lookup_buffer

The radeonsi driver doesn't and shouldn't care about the buffer index.
Only the virtual addresses matter.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/amdgpu: remove unused field domains from amdgpu_cs_buffer
Nicolai Hähnle [Wed, 7 Sep 2016 16:07:22 +0000 (18:07 +0200)]
winsys/amdgpu: remove unused field domains from amdgpu_cs_buffer

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/amdgpu: remove initial buffer list allocation
Nicolai Hähnle [Wed, 7 Sep 2016 10:42:15 +0000 (12:42 +0200)]
winsys/amdgpu: remove initial buffer list allocation

It's really not necessary.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agowinsys/amdgpu: extract adding a new buffer list entry into its own function
Nicolai Hähnle [Wed, 7 Sep 2016 10:39:30 +0000 (12:39 +0200)]
winsys/amdgpu: extract adding a new buffer list entry into its own function

While at it, try to be a little more robust in the face of memory allocation
failure.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>