Commit Graph

77279 Commits

Author SHA1 Message Date
Jordan Justen 8ce2b0e140 nir/spirv: Add support for ArrayLength op
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-13 23:34:45 -08:00
Jason Ekstrand 4507d8a57a nir/spirv/alu: Properly implement mod/rem 2016-01-13 16:53:02 -08:00
Jason Ekstrand 7d5ae2d34b i965: Implement nir_op_irem and nir_op_srem 2016-01-13 16:53:02 -08:00
Jason Ekstrand cac99fffdb nir: Add more modulus and remainder opcodes
SPIR-V makes a distinction between "modulus" and "remainder" for both
floating-point and signed integer variants.  The difference is primarily
one of which source they take their sign from.  The "remainder" opcode for
integers is equivalent to the C/C++ "%" operation while the "modulus"
opcode is more mathematically correct (at least for an unsigned divisor).
This commit adds corresponding opcodes to NIR.
2016-01-13 15:18:36 -08:00
Jason Ekstrand 0079523a0d nir/spirv: Add support for OpSpecConstantOp 2016-01-13 15:18:36 -08:00
Jason Ekstrand 8c408b9b81 nir/spirv/alu: Factor out the opcode table 2016-01-13 15:18:36 -08:00
Jason Ekstrand 9b7e08118b anv/pipeline: Pass through specialization constants 2016-01-13 15:18:36 -08:00
Jason Ekstrand c95c3b2c21 nir/spirv: Add initial support for specialization constants 2016-01-13 15:18:36 -08:00
Jason Ekstrand 610aa00cdf nir/spirv: Add support for OpQuantize 2016-01-12 15:36:38 -08:00
Jason Ekstrand 282a837317 i965: Implement nir_op_fquantize2f16 2016-01-12 15:35:00 -08:00
Jason Ekstrand 15a56459d7 nir: Add a fquantize2f16 opcode
This opcode simply takes a 32-bit floating-point value and reduces its
effective precision to 16 bits.
2016-01-12 15:33:02 -08:00
Jason Ekstrand aee970c844 anv/device: Bump the max program size again
No one will ever need more than 128K, right?
2016-01-12 13:49:05 -08:00
Kristian Høgsberg Kristensen d7a193327b vk: Implement workaround for occlusion queries
We have an issue with occlusion queries (PIPE_CONTROL depth writes)
after using the pipeline with the VS disabled. We work around it by
using a depth cache flush PIPE_CONTROL before doing a depth write.

Fixes dEQP-VK.query_pool.*
2016-01-12 11:50:36 -08:00
Jason Ekstrand 6fc278ae4f anv/UpdateDescriptorSets: Respect write.dstArrayElement 2016-01-12 11:45:12 -08:00
Kristian Høgsberg Kristensen af422fe9b3 Merge ../mesa into vulkan
Merge master again to get the brw_device_info with the
correct slice counts for KBL.
2016-01-12 10:54:26 -08:00
Kristian Høgsberg Kristensen 7df20f0c14 vk: Support SpvBuiltInViewportIndex 2016-01-12 10:53:59 -08:00
Kristian Høgsberg Kristensen 2b4bacb84b vk: Use the correct stride for CC_VIEWPORT structs 2016-01-12 10:53:59 -08:00
Tom St Denis 56fc2986d5 st/omx: Avoid segfault in deconstructor if constructor fails
If the constructor fails before the LIST_INIT calls the pointers
will be null and the deconstructor will segfault.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2016-01-12 19:13:19 +01:00
Christian König 6f898f740c vl: use preferred format for deinterlacing
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:42 +01:00
Christian König 5fdd4a5aef vl: improve motion adaptive deinterlacer
Handle other formats than YV12 as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:39 +01:00
Christian König e945235aed st/va: add BOB deinterlacing v2
Tested with MPV.

v2: correctly handle compositor deinterlacing as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:35 +01:00
Christian König 3949cf0e02 st/va: add NV12 -> NV12 post processing v2
Usefull for mpv and GStreamer.

v2: use common functionality for size adjustment.

Signed-off-by: Indrajit-kumar Das <Indrajit-kumar.Das@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:28 +01:00
Christian König 9f644295dc st/va: use vl_video_buffer_adjust_size
Use the new helper function instead of open coding it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:24 +01:00
Christian König da39637764 st/vdpau: use vl_video_buffer_adjust_size
Use the new helper function instead of open coding it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:21 +01:00
Christian König 52ca9a9b8b vl/buffers: extract vl_video_buffer_adjust_size helper
Useful for the state trackers as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-01-12 13:28:16 +01:00
Christian König 8479782361 st/va: make the implementation thread safe v2
Otherwise we might crash with MPV.

v2: minor cleanups suggested on the list.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Julien Isorce <j.isorce@samsung.com>
Tested-by: Julien Isorce <j.isorce@samsung.com>
2016-01-12 13:26:24 +01:00
Jason Ekstrand 62e56492c3 nir/spirv: Allow non-block variables with interface types in lists
The original objective was to disallow UBO and SSBO variables from the
variable lists.  This was accidentally broken in b208620fd when fixing some
other interface issues.
2016-01-12 01:32:19 -08:00
Jason Ekstrand 4141d13de5 nir/spirv: Handle matrix decorations on arrays of matrices
Connor's original shallow-copy plan works great except that a couple of the
decorations apply to a matrix which may be some levels down in an array.
We weren't properly unpacking that.  This fixes most of the remaining SSBO
and UBO layout tests.
2016-01-12 01:04:44 -08:00
Tapani Pälli 8926dc87af mesa: use gl_shader_variable in program resource list
Patch changes linker to allocate gl_shader_variable instead of using
ir_variable. This makes it possible to get rid of ir_variables and ir
in memory after linking.

v2: check that we do not create duplicate entries with
    packed varyings

v3: document 'patch' bit (Ilia Mirkin)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-01-12 09:07:10 +02:00
Tapani Pälli 4985159ad6 glsl: track total amount of uniform locations used
Linker missed a check for situation where we exceed max amount of
uniform locations with explicit + implicit locations. Patch adds this
check to already existing iteration over uniforms in linker.

Fixes following CTS test:
   ES31-CTS.explicit_uniform_location.uniform-loc-negative-link-max-num-of-locations

v2: use var->type->uniform_locations() (Timothy)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-01-12 07:52:44 +02:00
Jason Ekstrand b208620fd2 nir/spirv: Allow creating local/global variables from interface types
Not sure if this is actually allowed, but it's not that hard to just strip
the interface information from the type.
2016-01-11 17:45:54 -08:00
Jason Ekstrand 350bbd3d15 nir/spirv: Allow base derefs in get_vulkan_resource_index 2016-01-11 17:45:24 -08:00
Jason Ekstrand 1c5393d57d nir/spirv: Allow OpBranchConditional without a merge
This can happen if you have a predicated break/continue.
2016-01-11 17:03:52 -08:00
Jason Ekstrand 24523e98a4 nir/spirv/cfg: Allow breaking from the continue block 2016-01-11 17:03:16 -08:00
Jason Ekstrand c381906bbd nir/spirv: Stop wrapping carry/borrow in b2i
The upstream versions now return an integer like GLSL/SPIR-V want.
2016-01-11 17:02:30 -08:00
Jason Ekstrand dee09d7393 nir/spirv: Better handle OpCopyMemory 2016-01-11 16:29:38 -08:00
Jason Ekstrand 1ca97cefb0 nir/spirv: Add no-op support for OpSourceContinued 2016-01-11 16:06:11 -08:00
Erik Faye-Lund 395b53dad6 main: get rid of needless conditional
We already check if the driver changed the completeness, we don't
need to duplicate that check. Let's just early out there instead.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-01-12 11:02:16 +11:00
Erik Faye-Lund 2a15dc0dd5 gallium/util: removed unused header-file
This hasn't been in use since c476305 ("gallium/util: pregenerate
half float tables"), where the last bit of run-time init using this
was killed. So let's just get rid of the pointless header.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-01-12 11:02:08 +11:00
Samuel Pitoiset e67f5cac79 nvc0: do not force re-binding of compute constbufs on Fermi
Re-binding compute constant buffers after launching a grid have no effects
because they are not currently validated and because dirty_cp is not updated
accordingly. This might also prevent weird future behaviours when UBOs will
be bound for compute.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-12 00:47:20 +01:00
Ian Romanick 5be700e5cc meta: Unconditionally set GL_SKIP_DECODE_EXT
The path that depends on this will be avoided (by fallback_required) if
the extension is not supported.  _mesa_set_sampler_srgb_decode does not
generate GL errors (by design), so there are no problems there.

I kept this change separate and last because it is one of the few in the
series that is not a candidate for the stable branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:04 -08:00
Ian Romanick 1799eddb51 meta: Only bind the sampler in one place
All of the calls after the first _mesa_bind_sampler call are DSA style
calls that don't depend on the current binding.

I kept this change separate and last because it is one of the few in the
series that is not a candidate for the stable branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:04 -08:00
Ian Romanick ae50157363 meta/decompress: Don't pollute the sampler object namespace
tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:04 -08:00
Ian Romanick b03ee127d8 meta/decompress: Save and restore the sampler using gl_sampler_object instead of GL API object handle
Some meta operations can be called recursively.  Future changes (the
"Don't pollute the ... namespace" changes) will cause objects with
invalid names to be used.  If a nested meta operation tries to restore
an object named 0xDEADBEEF, it will fail.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:04 -08:00
Ian Romanick d4094f64c1 meta/decompress: Track sampler using gl_sampler_object instead of GL API object handle
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00
Ian Romanick 1998af813a meta/decompress: Use internal functions for sampler object access
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00
Ian Romanick b85c5fe526 meta/generate_mipmap: Don't pollute the sampler object namespace
tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00
Ian Romanick d6782712a1 meta/generate_mipmap: Save and restore the sampler using gl_sampler_object instead of GL API object handle
Some meta operations can be called recursively.  Future changes (the
"Don't pollute the ... namespace" changes) will cause objects with
invalid names to be used.  If a nested meta operation tries to restore
an object named 0xDEADBEEF, it will fail.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00
Ian Romanick 36f413209f meta/generate_mipmap: Track sampler using gl_sampler_object instead of GL API object handle
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00
Ian Romanick b94e7f398d meta/generate_mipmap: Use internal functions for sampler object access
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-01-11 15:38:03 -08:00