Jason Ekstrand [Thu, 24 Dec 2015 02:10:08 +0000 (18:10 -0800)]
nir/cf: Make extracting or re-inserting nothing a no-op
Jason Ekstrand [Thu, 24 Dec 2015 02:09:42 +0000 (18:09 -0800)]
nir: Add a function for comparing cursors
Jason Ekstrand [Wed, 23 Dec 2015 22:14:39 +0000 (14:14 -0800)]
nir/spirv: Add support for undefs in vtn_ssa_value()
Jason Ekstrand [Wed, 23 Dec 2015 21:17:18 +0000 (13:17 -0800)]
nir/spirv: Properly handle vector times matrix
Jason Ekstrand [Wed, 23 Dec 2015 21:17:00 +0000 (13:17 -0800)]
nir/spirv: Create the correct type if a matrix-vector multiply produces a vector
Jason Ekstrand [Wed, 23 Dec 2015 21:13:54 +0000 (13:13 -0800)]
nir/spirv: Fix some mem_ctx issues with create_vec
Jason Ekstrand [Wed, 23 Dec 2015 20:45:13 +0000 (12:45 -0800)]
nir/spirv: Better document vtn_ssa_value.transposed
Jason Ekstrand [Wed, 23 Dec 2015 19:25:35 +0000 (11:25 -0800)]
anv/descriptor_set: Use anv_foreach_stage
Jason Ekstrand [Wed, 23 Dec 2015 19:24:23 +0000 (11:24 -0800)]
anv: Mask out invalid stages in foreach_stage
Jason Ekstrand [Wed, 23 Dec 2015 19:11:58 +0000 (11:11 -0800)]
nir/spirv: Handle LogicalNot
Jason Ekstrand [Wed, 23 Dec 2015 19:10:58 +0000 (11:10 -0800)]
nir/spirv: Handle derefs in vtn_ssa_value
This is kind of a hack, but it makes vtn_ssa_value insert a load if the
value requested is actually a deref. This shouldn't happen normally but,
thanks to the impedence mismatch of the NIR function parameter model vs.
the SPIR-V model, this can happen for function arguments.
Jason Ekstrand [Wed, 23 Dec 2015 19:10:13 +0000 (11:10 -0800)]
nir/spirv: Do boolean fixup on block loads
We used to do it for variable loads on things of type "uniform" but that
never got ported to block loads.
Jason Ekstrand [Tue, 22 Dec 2015 05:20:50 +0000 (21:20 -0800)]
spirv/nir: Handle non-vector extractions in vtn_composite_extract
Jason Ekstrand [Fri, 18 Dec 2015 23:07:16 +0000 (15:07 -0800)]
nir/spirv: Handle function calls
Jason Ekstrand [Fri, 18 Dec 2015 23:06:02 +0000 (15:06 -0800)]
nir: Create the params array in function_impl_create
Jason Ekstrand [Fri, 18 Dec 2015 19:28:57 +0000 (11:28 -0800)]
i965/nir: Remove return handling
This was added because we were getting spurrious returns coming out of
SPIR-V. Now that we're calling lower_returns, we don't need this.
Jason Ekstrand [Fri, 18 Dec 2015 19:28:21 +0000 (11:28 -0800)]
anv/pipeline: Run lower_returns and inline_functions after spirv_to_nir
Jason Ekstrand [Fri, 18 Dec 2015 20:17:29 +0000 (12:17 -0800)]
nir: Add a function inlining pass
Jason Ekstrand [Fri, 18 Dec 2015 20:16:45 +0000 (12:16 -0800)]
nir/builder: Add a copy_deref_var helper
Jason Ekstrand [Fri, 18 Dec 2015 19:45:59 +0000 (11:45 -0800)]
nir: move nir_copy_var from anv_nir_builder to nir_builder
Jason Ekstrand [Wed, 28 Oct 2015 04:44:27 +0000 (21:44 -0700)]
nir/clone: Add support for cloning a single function_impl
This will be useful for things such as function inlining.
Jason Ekstrand [Wed, 28 Oct 2015 04:34:56 +0000 (21:34 -0700)]
nir: Add a helper for creating a "bare" nir_function_impl
This is useful if you want to clone a single function_impl if, for
instance, you wanted to do function inlining.
Jason Ekstrand [Fri, 18 Dec 2015 19:27:00 +0000 (11:27 -0800)]
nir/control_flow: Handle relinking top-level blocks
This can happen if a function ends in a return instruction and you remove
the return.
Jason Ekstrand [Fri, 18 Dec 2015 19:16:16 +0000 (11:16 -0800)]
nir: Add a stub function inlining pass
All it does is remove the return at the end, but it's good enough for
simple functions.
Jason Ekstrand [Fri, 18 Dec 2015 22:39:02 +0000 (14:39 -0800)]
nir/print: Factor variable name lookup into a helper
Otherwise, we have a problem when we go to print functions with arguments
because their names get added to the hash table during declaration which
happens after we print the prototype.
Kristian Høgsberg Kristensen [Sun, 20 Dec 2015 06:25:57 +0000 (22:25 -0800)]
vk: Only require wc bo mmap for !llc GPUs
Kristian Høgsberg Kristensen [Sun, 20 Dec 2015 06:18:12 +0000 (22:18 -0800)]
vk: Remove stale 48 bit addresses FIXMEs
This has worked fine for a long time.
Kristian Høgsberg Kristensen [Sun, 20 Dec 2015 06:17:19 +0000 (22:17 -0800)]
vk/gen8: Implement VkEvent for gen8
We use PIPE_CONTROL for setting and resetting the event from cmd buffers
and MI_SEMAPHORE_WAIT in polling mode for waiting on an event.
Kristian Høgsberg Kristensen [Tue, 15 Dec 2015 21:51:23 +0000 (13:51 -0800)]
vk: Fix check for I915_PARAM_MMAP_VERSION
Comparing the wrong thing for < 1.
Jordan Justen [Fri, 18 Dec 2015 09:42:46 +0000 (01:42 -0800)]
anv/gen8: Add support for gl_NumWorkGroups
Co-authored-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jason Ekstrand [Fri, 18 Dec 2015 00:36:23 +0000 (16:36 -0800)]
nir/spirv: Array lengths are constants not literals
Jason Ekstrand [Thu, 17 Dec 2015 21:51:09 +0000 (13:51 -0800)]
anv/formats: Add more 64-bit formats
Jason Ekstrand [Thu, 17 Dec 2015 21:44:50 +0000 (13:44 -0800)]
anv/formats: Add more PACK32 formats
Jason Ekstrand [Thu, 17 Dec 2015 19:45:24 +0000 (11:45 -0800)]
anv/image: Properly report buffer features
Jason Ekstrand [Thu, 17 Dec 2015 19:45:04 +0000 (11:45 -0800)]
isl: Add a is_storage_image_format helper
Jason Ekstrand [Thu, 17 Dec 2015 19:00:38 +0000 (11:00 -0800)]
anv/device: Handle zero-sized memory allocations
Jason Ekstrand [Thu, 17 Dec 2015 01:27:35 +0000 (17:27 -0800)]
anv/state: Allow levelCount to be 0
This can happen if the client is creating an image view of a textureable
surface and they only ever intend to render to that view.
Jason Ekstrand [Wed, 16 Dec 2015 01:24:18 +0000 (17:24 -0800)]
nir/spirv: Add a missing break statement
Jason Ekstrand [Wed, 16 Dec 2015 00:26:08 +0000 (16:26 -0800)]
anv/pipeline: Allow the user to pass a null MultisampleCreateInfo
According to section 5.2 of the Vulkan spec, this is allowed for color-only
rendering pipelines.
Jason Ekstrand [Wed, 16 Dec 2015 00:24:19 +0000 (16:24 -0800)]
anv/descriptor_set: Initialize immutable_samplers to NULL
Previously this wasn't a problem. However, with the new API update,
descriptor sets can now be sparse so the client doesn't have to provide an
entry for every binding. This means that it's possible for a binding to be
uninitialized other than the memset. In that case, we want to have a null
array of immutable samplers.
Jason Ekstrand [Tue, 15 Dec 2015 19:49:26 +0000 (11:49 -0800)]
anv/device: Bump the size of the instruction block pool
Some CTS test shaders were failing to compile. At some point soon, we
really need to make a real pipeline cache and stop using a block pool for
this.
Jason Ekstrand [Tue, 15 Dec 2015 19:36:55 +0000 (11:36 -0800)]
anv/pipeline: Properly set IncludeVertexHandles in 3DSTATE_GS
Jason Ekstrand [Tue, 15 Dec 2015 04:33:46 +0000 (20:33 -0800)]
nir/spirv: Add support for more CS intrinsics
Jason Ekstrand [Tue, 15 Dec 2015 04:22:09 +0000 (20:22 -0800)]
nir/lower_system_values: Add support for computed builtins.
In particular, this commit adds support for computing gl_GlobalInvocationID
and gl_LocalInvocationIndex from other intrinsics.
Jason Ekstrand [Tue, 15 Dec 2015 04:20:58 +0000 (20:20 -0800)]
shader_enums: Add enums for gl_GlobalInvocationID and gl_LocalInvocationIndex
Jason Ekstrand [Tue, 15 Dec 2015 03:51:51 +0000 (19:51 -0800)]
nir/lower_system_values: Refactor and use the builder.
Now that we have a helper in the builder for system values and a helper in
core NIR to get the intrinsic opcode, there's really no point in having
things split out into a helper function. This commit "modernizes" this
pass to use helpers better and look more like newer passes.
Jason Ekstrand [Tue, 15 Dec 2015 03:51:50 +0000 (19:51 -0800)]
nir/builder: Add a load_system_value helper
While we're at it, go ahead and make nir_lower_clip use it.
Cc: Rob Clark <robclark@gmail.com>
Jason Ekstrand [Tue, 15 Dec 2015 03:51:49 +0000 (19:51 -0800)]
nir/lower_system_values: Stop supporting non-SSA
The one user of this (i965) only ever calls it while in SSA form.
Chad Versace [Sat, 12 Dec 2015 01:14:52 +0000 (17:14 -0800)]
isl: Add func isl_surf_get_image_offset_sa
The function calculates the offset to a subimage within the surface, in
units of surface samples.
All unit tests pass with `make check`. (Admittedly, though, there are
too few unit tests).
Chad Versace [Mon, 14 Dec 2015 20:31:55 +0000 (12:31 -0800)]
isl: Fix calculation of array pitch for layout GEN4_2D
The height of the miptree's right half was not large enough.
Found by `make check` in test_isl_surf_get_offset, which is added in the
next commit.
Chad Versace [Mon, 14 Dec 2015 18:28:18 +0000 (10:28 -0800)]
isl: Move it a standalone directory
The plan all along was to eventualyl move isl out of the Vulkan
directory, because I intended i965 and anvil to share it.
A small problem I encountered when attempting to write unit tests for
isl precipitated the move. I discovered that it's easier to get isl
unit tests to build if I remove the extra, unneeded dependencies
injected by src/vulkan/Makefile.am. And the easiest way to remove those
unneeded dependencies is to move isl out of src/vulkan. (Unit tests come
in subsequent commits).
Jason Ekstrand [Tue, 15 Dec 2015 05:10:26 +0000 (21:10 -0800)]
vec4/generator: Actually pass the sampler into generate_tex
This is an artifact of the way the separate samplers/textures series ended
up getting sent out and rebased. This should fix a number of CTS tests
involving geometry shaders.
Jordan Justen [Tue, 15 Dec 2015 02:16:38 +0000 (18:16 -0800)]
anv: Rename gs_vec4 to gs_kernel
The code generated may be vec4 or simd8 depending on how we start the
compiler.
To run the GS in SIMD8, set the INTEL_SCALAR_GS environment variable.
This was added in:
commit
36fd65381756ed1b8f774f7fcdd555941a3d39e1
Author: Kenneth Graunke <kenneth@whitecape.org>
Date: Wed Mar 11 23:14:31 2015 -0700
i965: Add scalar geometry shader support.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Tue, 15 Dec 2015 02:12:57 +0000 (18:12 -0800)]
nir/spirv_to_nir: Use a minimum of 1 for GS invocations
glslang is giving us 0, which causes the SIMD8 GS compile to hit an
assert.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jason Ekstrand [Tue, 15 Dec 2015 00:59:59 +0000 (16:59 -0800)]
anv: Fix CUBE storage images
Jason Ekstrand [Tue, 15 Dec 2015 00:51:12 +0000 (16:51 -0800)]
anv: Add support for storage texel buffers
Jason Ekstrand [Tue, 15 Dec 2015 00:14:20 +0000 (16:14 -0800)]
anv: Pass an isl_format into fill_buffer_surface_state
Jordan Justen [Mon, 14 Dec 2015 23:24:11 +0000 (15:24 -0800)]
anv/cmd_buffer: Gen 8 requires 64 byte alignment for push constant data
See MEDIA_CURBE_LOAD, CURBE Data Start Address & CURBE Total Data Length
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jason Ekstrand [Mon, 14 Dec 2015 22:52:57 +0000 (14:52 -0800)]
anv: Add initial support for cube maps
This fixes 486 cubemap CTS tests.
Jason Ekstrand [Mon, 14 Dec 2015 22:09:35 +0000 (14:09 -0800)]
anv/buffer_view: Store a bo + offset instead of buffer pointer
This is what image_view does. Also, we really need to do this so that we
can properly handle the combined offsets from the buffer and from
pCreateInfo.
This fixes some of the nonzero offset buffer view CTS tests.
Chad Versace [Thu, 10 Dec 2015 00:59:02 +0000 (16:59 -0800)]
anv: Remove anv_image::surface_type
When building RENDER_SURFACE_STATE, the driver set
SurfaceType = anv_image::surface_type, which was calculated during
anv_image_init(). This was bad because the value of
anv_image::surface_type was taken from a gen-specific header,
gen8_pack.h, even though the anv_image structure is used for all gens.
Replace anv_image::surface_type with a gen-specific lookup function,
anv_surftype(), defined in gen${x}_state.c.
The lookup function contains some useful asserts that caught some nasty
bugs in anv meta, which were fixed in the previous commit.
Chad Versace [Thu, 10 Dec 2015 01:03:14 +0000 (17:03 -0800)]
anv/meta: Fix VkImageViewType
Meta unconditionally used VK_IMAGE_VIEW_TYPE_2D in the functions below.
This caused some out-of-bound memory accesses.
anv_CmdCopyImage
anv_CmdBlitImage
anv_CmdCopyBufferToImage
anv_CmdClearColorImage
Fix it by adding a new function, anv_meta_get_view_type().
Chad Versace [Mon, 14 Dec 2015 16:48:19 +0000 (08:48 -0800)]
isl: Rename s/lod_align/image_align/ for consistency
Regarding the subimages within a surface, sometimes isl called them
"images" and sometimes "LODs". This patch make isl consistently refer to
them as "images". I choose the term "image" over "LOD" because LOD is
an misnomer when applied to 3D surfaces. The alignment applies to each
individual 2D subimage, not to the LOD as a whole.
This patch changes no behavior. It's just a manually performed,
case-insensitive, replacement s/lod/image/ that maintains correct
indentation. any behavior.
Chad Versace [Mon, 14 Dec 2015 16:27:59 +0000 (08:27 -0800)]
anv/tests: gitignore block_pool_no_free
Chad Versace [Mon, 14 Dec 2015 16:23:17 +0000 (08:23 -0800)]
anv: Fix build for unit tests
Clearly no one has been running `make check`, because the unittestbuild
has been broken for a long time. After this buildfix, all tests now
pass.
Jason Ekstrand [Sun, 13 Dec 2015 00:11:23 +0000 (16:11 -0800)]
anv: Add initial support for texel buffers
Jason Ekstrand [Sun, 13 Dec 2015 00:09:51 +0000 (16:09 -0800)]
i965/nir: Provide a default LOD for buffer textures
Our hardware requires an LOD for all texelFetch commands even if they are
on buffer textures. GLSL IR gives us an LOD of 0 in that case, but the LOD
is really rather meaningless. This commit allows other NIR producers to be
more lazy and not provide one at all.
Jason Ekstrand [Fri, 11 Dec 2015 22:29:13 +0000 (14:29 -0800)]
Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in a shared local memory fix.
Jason Ekstrand [Fri, 11 Dec 2015 19:59:53 +0000 (11:59 -0800)]
i965/fs: Use the correct source for local memory load offsets
The offset for loads is in src[0]. This was a copy+paste error in the
nir_intrinsic_load/store refactoring. This commit fixes a segfault in
ES31-CTS.compute_shader.work-group-size. I have no idea how piglit failed
to catch this...
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93348
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Jason Ekstrand [Fri, 11 Dec 2015 21:25:15 +0000 (13:25 -0800)]
gen8/pipeline: Support vec4 vertex shaders
In order to actually get them, you need INTEL_DEBUG=vec4.
Kenneth Graunke [Thu, 12 Nov 2015 07:22:06 +0000 (23:22 -0800)]
i965: Add Gen8+ tessellation control shader state (3DSTATE_HS).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Kenneth Graunke [Thu, 12 Nov 2015 07:15:23 +0000 (23:15 -0800)]
i965: Add Gen7+ tessellation engine state (3DSTATE_TE).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Kenneth Graunke [Tue, 10 Nov 2015 22:35:27 +0000 (14:35 -0800)]
i965: Add Gen8+ tessellation evaluation shader state (3DSTATE_DS).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Kenneth Graunke [Thu, 1 Oct 2015 00:04:23 +0000 (17:04 -0700)]
i965: Add tessellation shader push constant support.
Based on a patch by Chris Forbes.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Kenneth Graunke [Sat, 10 Oct 2015 00:07:23 +0000 (17:07 -0700)]
i965: Add tessellation shader sampler support.
Based on code by Chris Forbes and Fabian Bieler.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Kenneth Graunke [Wed, 30 Sep 2015 22:42:54 +0000 (15:42 -0700)]
i965: Add tessellation shader surface support.
This is brw_gs_surface_state.c copy and pasted twice with search and
replace.
brw_binding_table.c code is similarly copy and pasted.
v2: Drop dword_pitch related fields.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
Kenneth Graunke [Wed, 2 Dec 2015 01:52:58 +0000 (17:52 -0800)]
i965: Make fs_visitor::emit_urb_writes set EOT for TES as well.
Tessellation evaluation shaders work almost identically to vertex
shaders - we have a set of URB writes at the end of the program, and the
last one should terminate it.
Geometry shaders really are the special case, where multiple
EmitVertex() calls trigger URB writes in the middle of the program.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Kenneth Graunke [Wed, 2 Dec 2015 01:51:33 +0000 (17:51 -0800)]
i965: Don't hardcode g1 for URB handles in fs_visitor::emit_urb_writes().
Tessellation evaluation shaders will use g4 instead. For now, make an
fs_reg called urb_handle and use that in place of hardcoding g1.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Kenneth Graunke [Wed, 2 Dec 2015 02:20:54 +0000 (18:20 -0800)]
i965: Make brw_set_message_descriptor() non-static.
I want to use this directly from brw_vec4_generator.cpp.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Kristian Høgsberg Kristensen [Fri, 11 Dec 2015 21:09:42 +0000 (13:09 -0800)]
Revert "i965/HACK: Build brw_cs into libcompiler"
This reverts commit
6df7963531b9c33caf96a68e8e6cd4796677b8aa.
Kristian Høgsberg Kristensen [Fri, 11 Dec 2015 21:09:06 +0000 (13:09 -0800)]
Merge ../mesa into vulkan
Kristian Høgsberg Kristensen [Fri, 11 Dec 2015 19:18:18 +0000 (11:18 -0800)]
i965: Move brw_cs_fill_local_id_payload() to libi965_compiler
This is a helper function for setting up the local invocation ID
payload according to the cs_prog_data generated by the compiler. It's
intended to be available to users of libi965_compiler so move it there.
Eric Anholt [Fri, 11 Dec 2015 05:54:41 +0000 (21:54 -0800)]
vc4: Add quick algebraic optimization for clamping of unpacked values.
GL likes to saturate your incoming color, but if that color's coming from
unpacking from unorms, there's no point. Ideally we'd have a range
propagation pass that cleans these up in NIR, but that doesn't seem to be
going to land soon. It seems like we could do a one-off optimization in
nir_opt_algebraic, except that doesn't want to operate on expressions
involving unpack_unorm_4x8, since it's sized.
total instructions in shared programs: 87879 -> 87761 (-0.13%)
instructions in affected programs: 6044 -> 5926 (-1.95%)
total estimated cycles in shared programs: 349457 -> 349252 (-0.06%)
estimated cycles in affected programs: 6172 -> 5967 (-3.32%)
No SSPD on openarena (which had the biggest gains, in its VS/CSes), n=15.
Eric Anholt [Fri, 11 Dec 2015 06:02:30 +0000 (22:02 -0800)]
vc4: When doing algebraic optimization into a MOV, use the right MOV.
If there were src unpacks, changing to the integer MOV instead of float
(for example) would change the unpack operation.
Eric Anholt [Fri, 11 Dec 2015 06:23:10 +0000 (22:23 -0800)]
vc4: Fix handling of src packs on in qir_follow_movs().
The caller isn't going to expect it from a return, so it would probably
get misinterpreted. If the caller had an unpack in its reg, that's fine,
but don't lose track of it.
Eric Anholt [Fri, 11 Dec 2015 05:51:03 +0000 (21:51 -0800)]
vc4: Add missing progress note in opt_algebraic.
Eric Anholt [Wed, 9 Dec 2015 01:55:36 +0000 (17:55 -0800)]
vc4: Add debugging of the estimated time to run the shader to shader-db.
Eric Anholt [Wed, 9 Dec 2015 01:18:37 +0000 (17:18 -0800)]
vc4: Fix handling of sample_mask output.
I apparently broke this in a late refactor, in such a way that I decided
its tests were some of those interminable ones that I should just
blacklist from my testing. As a result, the refactors related to it were
totally wrong.
Edward O'Callaghan [Fri, 11 Dec 2015 11:43:31 +0000 (22:43 +1100)]
softpipe: enable GL_ARB_viewport_array support, update GL3.txt doc
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Edward O'Callaghan [Fri, 11 Dec 2015 11:43:30 +0000 (22:43 +1100)]
softpipe: implement some support for multiple viewports
Mostly related to making sure the rasterizer can correctly
pick out the correct scissor box for the current viewport.
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Roland Scheidegger [Fri, 11 Dec 2015 03:53:21 +0000 (04:53 +0100)]
draw: don't assume fixed offset for data in struct vertex_info
Otherwise, if struct vertex_info is changed, you're in for some surprises...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Neil Roberts [Wed, 25 Nov 2015 11:14:37 +0000 (12:14 +0100)]
i965/gen9: Don't do fast clears when GL_FRAMEBUFFER_SRGB is enabled
When GL_FRAMEBUFFER_SRGB is enabled any single-sampled renderbuffers
are resolved in intel_update_state because the hardware can't cope
with fast clears on SRGB buffers. In that case it's pointless to do a
fast clear because it will just be immediately resolved.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Neil Roberts [Tue, 24 Nov 2015 15:34:46 +0000 (16:34 +0100)]
i965/gen9: Allow fast clears for non-MSRT SRGB buffers
SRGB buffers are not marked as losslessly compressible so previously
they would not be used for fast clears. However in practice the
hardware will never actually see that we are using SRGB buffers for
fast clears if we use the linear equivalent format when clearing and
make sure to resolve the buffer as a linear format before sampling
from it.
This is an important use case because by default the window system
framebuffers are created as SRGB so without this fast clears won't be
used there.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Neil Roberts [Tue, 24 Nov 2015 18:23:14 +0000 (19:23 +0100)]
i965/gen9: Resolve SRGB color buffers when GL_FRAMEBUFFER_SRGB enabled
SKL can't cope with the CCS buffer for SRGB buffers. Normally the
hardware won't see the SRGB formats because when GL_FRAMEBUFFER_SRGB
is disabled these get mapped to their linear equivalents. In order to
avoid relying on the CCS buffer when it is enabled this patch now
makes it flush the renderbuffers.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Neil Roberts [Tue, 24 Nov 2015 16:59:28 +0000 (17:59 +0100)]
i965/gen8+: Don't upload the MCS buffer for single-sampled textures
For single-sampled textures the MCS buffer is only used to implement
fast clears. However the surface always needs to be resolved before
being used as a texture anyway so the the MCS buffer doesn't actually
achieve anything. This is important for Gen9 because in that case SRGB
surfaces are not supported for fast clears and we don't want the
hardware to see the MCS buffer in that case.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Neil Roberts [Tue, 24 Nov 2015 16:01:03 +0000 (17:01 +0100)]
i965/meta-fast-clear: Disable GL_FRAMEBUFFER_SRGB during clear
Adds MESA_META_FRAMEBUFFER_SRGB to the meta save state so that
GL_FRAMEBUFFER_SRGB will be disabled when performing the fast clear.
That way the render surface state will be programmed with the linear
equivalent format during the clear. This is important for Gen9 because
the SRGB formats are not marked as losslessly compressible so in
theory they aren't support for fast clears. It shouldn't make any
difference whether GL_FRAMEBUFFER_SRGB is enabled for the fast clear
operation because the color is not actually written to the framebuffer
so there is no chance for the hardware to apply the SRGB conversion on
it anyway.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Marek Olšák [Wed, 9 Dec 2015 21:45:56 +0000 (22:45 +0100)]
winsys/amdgpu: clear the buffer cache on mmap failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Wed, 9 Dec 2015 21:45:56 +0000 (22:45 +0100)]
winsys/radeon: clear the buffer cache on mmap failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Wed, 9 Dec 2015 21:36:26 +0000 (22:36 +0100)]
winsys/amdgpu: clear the buffer cache on allocation failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Wed, 9 Dec 2015 21:36:26 +0000 (22:36 +0100)]
winsys/radeon: clear the buffer cache on allocation failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>