Commit Graph

77295 Commits

Author SHA1 Message Date
Anuj Phogat
0bf037c0fe i965/gen9: Return false in place of assert in intelEmitCopyBlit()
This allows the fallback paths to handle it correctly.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-05 13:43:32 -08:00
Anuj Phogat
5cbe01c83f i965/gen9: Remove regions overlap check in fast copy blit
Overlapping blits are anyway undefined in OpenGL. So no need
of overlap check here.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-05 13:43:32 -08:00
Anuj Phogat
3c8b97a45b i965/gen9: Don't use fast copy blit in case of non power of 2 cpp
Fast copy blit is currently enabled for use only with Yf/Ys tiling.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-05 13:43:32 -08:00
Jason Ekstrand
ec899f6b42 anv/pipeline: Lower indirect temporaries and inputs 2016-01-05 13:42:52 -08:00
Jason Ekstrand
bff45dc44e nir: Add an indirect deref lowering pass 2016-01-05 13:42:52 -08:00
Ian Romanick
ee4676aa57 i915/i965: Fix typo in perf_debug message
Trivial

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2016-01-05 13:18:45 -08:00
Brian Paul
a13e9adbee st/mesa: minor indentation fixes 2016-01-05 13:04:46 -07:00
Kristian Høgsberg Kristensen
30521fb19e vk: Implement a basic pipeline cache
This is not really a cache yet, but it allows us to share one state
stream for all pipelines, which means we can bump the block size without
wasting a lot of memory.
2016-01-05 12:03:21 -08:00
Kristian Høgsberg Kristensen
f551047751 vk: Destroy device->mutex when destroying the device 2016-01-05 12:03:21 -08:00
Brian Paul
f4caa7d2fc draw: minor indentation fix 2016-01-05 13:03:05 -07:00
Brian Paul
dce1e1a8eb mesa: minor clean-up of some memcpy/sizeof() calls in m_matrix.c
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:05 -07:00
Brian Paul
95d412181d util: add debug_dump_ubyte_rgba_bmp()
Like debug_dump_float_rgba_bmp() but takes ubyte values.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
f04d7439a0 mesa: check for z=0 in _mesa_Vertex3dv()
It's very rare that a GL app calls glVertex3dv(), but one in particular
calls it lot, always with Z = 0.  Check for that condition and convert
the call into glVertex2f.  This reduces VBO memory used and reduces
the number of times we have to switch between float[2] and float[3]
vertex formats in the svga driver.  This results in a small but
measurable performance improvement.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
eec8d7e7e0 svga: fix test for SVGA_NEW_STIPPLE
We only want to set the SVGA_NEW_STIPPLE dirty flag when the polygon
stipple state changes.  Before, we only set the flag when we were
enabling stipple, but not disabling.

We don't really have to add SVGA_NEW_STIPPLE to the dirty FS state
set since it's a subset of SVGA_NEW_RAST, but let's be explicit.

This doesn't fix any known bugs.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
993b04ee2c svga: add some comments in svga_state_vs.c
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
fc07658895 svga: change svga_hw_view_state::dirty to boolean
Since it's a true/false value.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
077aa3be93 svga: avoid emitting redundant SetVertexBuffers() commands
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Brian Paul
b11bd20889 svga: check for no-ops in svga_bind_sampler_states()
and svga_set_sampler_views().  If there's no change, return early
and don't set a SVGA_NEW_x dirty state flag.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-01-05 13:03:04 -07:00
Chad Versace
8d6f0a1b80 isl: Don't force linear for 1d surfaces in gen7_filter_tiling()
gen7_filter_tiling() should filter out only tiling flags that are
incompatible with the surface. It shouldn't make performance decisions,
such as forcing linear for 1D; that's the role of the caller.
2016-01-05 11:37:32 -08:00
Chad Versace
8135786605 isl: Document gen7_filter_tiling() 2016-01-05 11:35:13 -08:00
Chad Versace
33f06842be isl: Prefer linear tiling for 1D surfaces 2016-01-05 11:35:13 -08:00
Chad Versace
98af1cc6d7 isl: Remove isl_format_layout::bpb
struct isl_format_layout contained two near-redundant members: bpb (bits
per block) and bs (block size). There do exist some hardware formats for
which bpb != 8 * bs, but Vulkan does not use them. Therefore we don't
need bpb.
2016-01-05 10:00:39 -08:00
Chad Versace
89b68dc8d0 anv: Use isl_format_layout::bs instead of ::bpb
For all formats used by Vulkan, 8 * bs == bpb.
(bs=block_size_in_bytes, bpb=bits_per_block)
2016-01-05 10:00:39 -08:00
Chad Versace
a1d64ae561 isl: Align isl_surf::phys_level0_sa to the format's compression block 2016-01-05 09:52:07 -08:00
Chad Versace
2172f0e9bb isl: Fix mis-documented units of isl_surf::phys_level_sa
It's in physical surface samples. Hence the _sa suffix.
2016-01-05 09:52:07 -08:00
Ilia Mirkin
6531ccb705 i965: quieten compiler warning about out-of-bounds access
gcc 4.9.3 shows the following error:

brw_vue_map.c:260:20: warning: array subscript is above array bounds
[-Warray-bounds]
    return brw_names[slot - VARYING_SLOT_MAX];

This is because BRW_VARYING_SLOT_COUNT is a valid value for the enum
type. Adding an assert will generate no additional code but will teach
the compiler to not complain.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-01-05 12:07:53 -05:00
Julien Isorce
777d1453f1 build: enable st/va with nouveau driver
vainfo fails in vaDriverInit because "dd_create_screen"
does not reach strcmp(driver_name, "nouveau") code.
Indeed when compiling the va target.c, the macro GALLIUM_NOUVEAU
is not defined.
This patch define the macro the same it is done for dri and
vdpau targets.

Tested with:
./autogen.sh --enable-glx --enable-gles2 --enable-egl --enable-vdpau --enable-glx-tls=yes --enable-va
--with-gallium-drivers=swrast,nouveau --with-dri-drivers=swrast,nouveau --with-egl-platforms=x11

LIBVA_DRIVER_NAME=gallium vainfo
Output:
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple                  :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG4Simple            :	VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Baseline           :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-05 12:07:53 -05:00
Julien Isorce
abb30b9c8b nvc0: add support for st/va
- split nvc0_decoder_bsp in begin/next/end
- preserve content buffer when calling nvc0_decoder_bsp_next
- implement pipe_video_codec::begin_frame/end_frame

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

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-05 12:07:53 -05:00
Julien Isorce
7ba27f60f7 nouveau: split nouveau_vp3_bsp in begin/next/end
It allows to call nouveau_vp3_bsp_next multiple times
between one begin/end.

It is required to support st/va.

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

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
[imirkin: create strparm_bsp function, simplified w0 calculation]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-01-05 12:07:53 -05:00
Julien Isorce
851e7e12aa st/va: count number of slices
The counter was not set but used by the nouveau driver.
It is required otherwise visual output is garbage.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian Koenig <christian.koenig@amd.com>
2016-01-05 15:02:47 +00:00
Ilia Mirkin
14f21f53d5 i965/wm: use binding size for ubo/ssbo when automatic size is unset
This fixes the same tests that commit 8cf2e892f was attempting to fix:

ES31-CTS.shader_storage_buffer_object.advanced-unsizedArrayLength-cs-std430-vec-bindrangeOffset
ES31-CTS.shader_storage_buffer_object.advanced-unsizedArrayLength-cs-std430-vec-bindrangeSize

as confirmed by Samuel.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-01-05 01:30:09 -05:00
Ilia Mirkin
a1d664a0b7 Revert "i965/wm: use proper API buffer size for the surfaces."
This reverts commit 8cf2e892fc. It's
entirely bogus to attempt to store anything about the binding in the
buffer object itself, which might be bound any number of times.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-01-05 01:29:49 -05:00
Jason Ekstrand
8b403d599b nir/spirv: Add support for the ControlBarrier instruction 2016-01-04 22:08:24 -08:00
Jason Ekstrand
ba7b5edc26 anv/UpdateDescriptorSets: Use the correct index for the buffer view 2016-01-04 21:36:11 -08:00
Jason Ekstrand
b8f0bea07a nir/spirv: Implement extended add, sub, and mul 2016-01-04 20:59:16 -08:00
Jason Ekstrand
3a3c4aecf1 nir/spirv: Add support for bitfield operations 2016-01-04 17:37:10 -08:00
Jason Ekstrand
01ba96e059 nir/spirv: Add support for msb/lsb opcodes 2016-01-04 17:37:10 -08:00
Jason Ekstrand
f32370a536 nir/spirv: Add a documenting assert for OpConstantSampler 2016-01-04 17:37:10 -08:00
Jason Ekstrand
0309199802 nir/spirv: Add initial support for ConstantNull 2016-01-04 17:37:10 -08:00
Chad Versace
8cc21d3aea isl: Align single-level 2D surfaces to compression block
This fixes an assertion failure at isl.c:1003.

Reported-by: Nanley Chery <nanley.g.chery@intel.com>
2016-01-04 16:48:58 -08:00
Jason Ekstrand
151694228d anv/formats: Hand out different formats based on tiled vs. linear 2016-01-04 16:08:05 -08:00
Jason Ekstrand
f665fdf0e7 anv/image_view: Separate vulkan and isl formats
Previously, anv_image_view had a anv_format pointer that we used for
everything.  This commit replaces that pointer with a VkFormat enum copied
from the API and an isl_format.  In order to implement RGB formats, we have
to use a different isl_format for the actual surface state than the obvious
one from the VkFormat.  Separating the two helps us keep things streight.
2016-01-04 16:08:05 -08:00
Jason Ekstrand
ceb05131da anv_get_isl_format: Support depth+stencil aspect value
You just get the depth format in this case.
2016-01-04 16:08:05 -08:00
Jason Ekstrand
a7cc12910d anv/image: Do more work in anv_image_view_init
There was a bunch of common code in gen7/8_image_view_init that we really
should be sharing.
2016-01-04 16:08:05 -08:00
Jason Ekstrand
87dd59e578 anv/formats: Rework GetPhysicalDeviceFormatProperties
It now calls get_isl_format to get both linear and tiled views of the
format and determines linear/tiled properties from that.  Buffer properties
are determined from the linear format.
2016-01-04 16:08:05 -08:00
Jason Ekstrand
2712c0cca3 anv/formats: Add a tiling parameter to get_isl_format
Currently, this parameter does nothing.
2016-01-04 16:08:05 -08:00
Jason Ekstrand
603a3a9439 isl/format: Add some helpers for working with RGB formats 2016-01-04 16:08:05 -08:00
Jason Ekstrand
0639f44d0f isl: Add a file for format helpers 2016-01-04 16:08:05 -08:00
Jason Ekstrand
5f5fc23e7c genX/state: Pull some generic helpers into a shared header 2016-01-04 16:08:05 -08:00
Jason Ekstrand
ad9ff4f2b2 meta/blit: Rework how format and aspect choices are made
This commit does two things.  First, it introduces choose_* functions for
chosing formats and aspects.  Second, it changes the copy (not blit) code
to use appropreately sized UINT formats for everything except depth.  There
are two main reasons for this:  First, it means that compressed and other
non-renderable texture upload should "just work" because it won't be
tripping over non-renderable formats.  Second, it allows us to easly copy
an RGB buffer to and from an RGBX image because the formats will get
switched over to their UINT variants and the shader will deal with the
extra channel for us.
2016-01-04 16:08:05 -08:00