Commit Graph

85749 Commits

Author SHA1 Message Date
Jason Ekstrand e6f9637d8a intel/genxml: Make "SO Buffer Enable" fields boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:36 -07:00
Jason Ekstrand fa0285eaac intel/genxml: Make "Stencil Buffer Enable" a boolean
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:30 -07:00
Jason Ekstrand 34826078f6 intel/genxml: Make a couple of STREAMOUT fields booleans
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:26 -07:00
Jason Ekstrand 6a064ad01d intel/genxml: Make "Include Vertex Handles" and "Include Primitive ID" booleans
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:23 -07:00
Jason Ekstrand f21d3b4d01 intel/genxml: Make "Vector Mask Enable" a boolean
We also get rid of the "(VME)" a few places

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:19 -07:00
Jason Ekstrand aee501c87e intel/genxml: Make "Single Program Flow" a boolean
We also get rid of the "(SPF)" a few places.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-15 12:20:14 -07:00
Tobias Klausmann b7d9677de8 nv50/ir: constant fold OP_SPLIT
Split the source immediate value into new values and move them into the
original defs set by the split. Since we can only have up to 64-bit
immediates, this is largely beneficial for F64 (and, in the future, U64)
operations.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
[imirkin: always use U32, set newi for foldCount tracking]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-14 23:23:57 -04:00
Kenneth Graunke 75128d6ffd i965: Enable OpenGL 4.5.
Everything is in place.  There are still conformance issues to sort out,
but we may as well turn it on in master.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 17:35:13 -07:00
Jason Ekstrand 9d65595c06 anv/pipeline: Remove a meta hack from emit_ds_state
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 69b2e931d4 anv/image: Create views directly in VkCreate*View
Without meta, we no longer need the _init helpers and the ability to back
an image view with surface states allocated out of the command buffer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 0a2c375af9 anv/image: Get rid of the usage hacks for meta
Now that meta is gone and we're using blorp, we don't need all of the usage
hacks.  Instead, the usage provided by the app is exactly the usage that we
want because the app is the only thing creating image views.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 8e1a8dd47e anv: Move Create*Pipelines into genX_cmd_buffer.c
Now that we don't have meta, we have no need for a gen-agnostic pipeline
create path.  We can, instead, just generate one Create*Pipelines function
per gen and be done with it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 7df46b7533 anv/pipeline: Remove support for direct-from-nir shaders
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 6d557ae403 anv: Make entrypoint resolution take a gen_device_info
In order for things such as the ANV_CALL and the ifuncs to work, we used to
have a singleton gen_device_info structure that got assigned the first time
you create a device.  Given that the driver will never be used
simultaneously on two different generations of hardware, this was fairly
safe to do.  However, it has caused a few hickups and isn't, in general, a
good plan.  Now that the two primary reasons for this singleton are gone,
we can get rid of it and make things quite a bit safer.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand 4c9dec80ed anv: Get rid of the ANV_CALL macro
This macro was needed by meta in order to make gen-specific calls from
gen-agnostic code.  Now that we don't have meta, the remaining two uses are
fairly trivial to get rid of.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-14 15:40:39 -07:00
Jason Ekstrand ac77528f7d anv: Get rid of graphics_pipeline_create_info_extra
Now that we no longer have meta, all pipelines get created via the normal
Vulkan pipeline creation mechanics.  There is no more need for this bit of
extra magic data that we've been passing around.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:40:39 -07:00
Jason Ekstrand dedc406ec8 anv: Get rid of meta
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:40:39 -07:00
Jason Ekstrand d823f92970 anv: Use blorp for subpass clears
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 51faab487f anv: Use blorp for ClearAttachments
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand c9eaf12de2 anv/hiz: Perform HiZ resolves for all partial renders
If we don't, we can end up with corruption in the portion of the depth
buffer that lies outside the render area when we do a HiZ resolve at the
end.  The only reason we weren't seeing this before was that all of the
meta-based clears such as VkCmdClearDepthStencilImage were internally using
HiZ so the HiZ buffer never truly got out-of-sync.  If the CTS ever tested
a depth upload (which doesn't care about HiZ) and then a partial render we
would have seen problems.  Soon, we will be using blorp to do depth clears
and it won't bother with HiZ so we would get CTS regressions without this.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 58f2315c38 anv: Use blorp for ClearDepthStencilImage
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 29e289fa65 anv/image: Add an isl_view to anv_image_view
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 0340548c8e anv/image: Rework our handling of 3-D image array ranges
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 146ee31159 anv/blorp: Don't hand-roll flush_pipeline_select_3d
When I initially brought up Vulkan blorp, I completely missed that this
was already factored out.  There's no good reason for us to hand-roll it.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand d80c0307ea intel/blorp: Add a flag to make blorp not re-emit dept/stencil buffers
In Vulkan, we want to be able to use blorp to perform clears inside of a
render pass.  If blorp stomps the depth/stencil buffers packets then we'll
have to re-emit them.  This gets tricky when secondary command buffers get
involved.  Instead, we'll simply guarantee that the depth and stencil
buffers we pass to blorp (if any) match those already set in the hardware.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 0cabf93b80 intel/blorp: Add an entrypoint for clearing depth and stencil
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 82a2c49c5f intel/blorp: Emit a NULL render target for depth/stencil-only operations
This never mattered before because the only time we used blorp
depth/stencil only was to do HiZ operations on gen6-7.  It may have worked
in that case (and maybe it didn't) but slow depth clears actually do depth
rendering so they need a valid render target.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand b324c38ae3 intel/blorp: Allow for running without a PS on gen8+
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 81be7be119 intel/blorp: Add an "enabled" bit to surface_info
This gives a slightly smarter way to check whether or not a particular
surface exists than looking at the address.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand bc4bb5a7e3 intel/blorp: Emit more complete DEPTH_STENCIL state
This should now set the pipeline up properly for doing depth and/or stencil
clears by plumbing through depth/stencil test values.  We are now also
emitting color calculator state for blorp operations without an actual
shader because that is where the stencil reference value goes pre-SKL.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 7017742ad7 intel/blorp: Unify the DEPTH_STENCIL emit code across gens
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand cf2e3c3163 intel/blorp: Simplify depth/stencil config
The newly reworked depth/stencil config code can properly handle having
depth, stencil, both, or neither.  We no longer need to predicate it on
having depth or stencil.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 0414aaa133 intel/blorp: Set QPitch for depth and HiZ on gen8+ 2016-10-14 15:39:41 -07:00
Jason Ekstrand 563fa63bf2 intel/blorp: Add support for binding an actual stencil buffer
While we're here, we also make depth without HiZ work.

v2:
 - Use the correct surface type for 1-D on SKL+
 - Set QPitch on BDW+

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand f180faab79 intel/blorp: Move CLEAR_PARAMS setup into emit_depth_stencil_config
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand c1fcf1a957 intel/genxml: Add a uint MOCS field to 3DSTATE_STENCIL_BUFFER
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2016-10-14 15:39:41 -07:00
Jason Ekstrand 5dacd3caee intel/blorp: Make the Z component of the primitive adjustable
We want to be able to start doing slow depth clears with blorp.  This
allows us to adjust the depth we're clearing to.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-10-14 15:39:41 -07:00
Emil Velikov 7cb197c3a8 i915: workaround multiple intelFenceExtension definitions
Due to conflicting symbol names (between i915 and i965) in the
megadriver, we use a set of defines in i915/intel_screen.h.

With a recent commit we've introduced a symbol intelFenceExtension which
has different implementation for each driver, yet we forgot to add the
define.

Fixes: d11515ff1b ("i915/sync: Implement DRI2_Fence extension")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98264
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 19:22:16 +01:00
Chad Versace cb836b673c docs/specs: Update allocated EGL enum values
Document the EGL enum ranges for Mesa and those values allocated by the
following extensions:

    EGL_MESA_drm_image
    EGL_MESA_platform_gbm
    EGL_MESA_platform_surfaceless
    EGL_WL_bind_wayland_display

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:41 -07:00
Chad Versace 0cfa34c102 doc/specs: Reference the Khronos registry XML
Years ago Khronos replaced the registry's spec files with newfangled XML
files.  Update the reference in doc/specs/enum.txt accordingly.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:40 -07:00
Chad Versace 88b5c36fe1 egl: Move old EGL_MESA_screen_surface spec
It was the lone file in src/egl/docs. Move it to where the other specs
live, in $MESA_TOP/docs/specs.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:40 -07:00
Chad Versace a597c8ad5b egl: Implement EGL_MESA_platform_surfaceless
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:40 -07:00
Chad Versace c177ef9d47 egl: Don't advertise unsupported platform extensions
Mesa's set of supported platform extensions depends on the autoconf
option --with-egl-platforms=foo,bar,baz. If --with-egl-platforms lacks
foo, then eglGetPlatformDisplay(EGL_PLATFORM_FOO, ...) unconditonally
fails.

So, if --with-egl-platforms lacks foo, then remove
EGL_VENDOR_platform_foo from the EGL client extension string.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:27 -07:00
Chad Versace 27f4e38173 docs: Add EGL_MESA_platform_surfaceless.txt (v2)
v2:
    - Assign enum values.
    - Define interactions with EGL_EXT_platform_base and EGL 1.4.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 11:19:13 -07:00
Ian Romanick 4246986dec i965: Sort some extension names
Trivial.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2016-10-14 11:16:59 -07:00
Jose Fonseca b12606b693 scons: Fix the Python dependency scanner.
modulefinder wasn't searching for dependencies in the script dir.

It's not capable of detecting the sys.path manipulations scripts do
internally neither.

This change fixes the first issue, and hacks around the second.

Honestly, I've come to the conclusion that automatic Python dependency it will always be
too brittle.   I think we should start manually typing the dependencies
like we do in automake.  At very least it will enable any person to
eyeball and spot/fix missing dependencies, without dig into SCons internals.
2016-10-14 16:52:13 +01:00
Jose Fonseca c6d17701c8 pipe_loader_sw: Don't invoke Unix close() on Windows.
Trivial.
2016-10-14 16:29:04 +01:00
Emil Velikov ebffa7b6af Revert "egl/dri2: rework dri2_make_current code flow"
This reverts commit 675719817e.
2016-10-14 16:07:33 +01:00
Mauro Rossi 6eacd69b6f i915: store reference to the context within struct intel_fence (v2)
Porting of the corresponding patch for i965.

Here follows the original commit message by Tomasz Figa:

"As the spec allows for {server,client}_wait_sync to be called without
currently bound context, while our implementation requires context
pointer.

v2: Add a mutex and acquire it for the duration of
    brw_fence_client_wait() and brw_fence_is_completed() as suggested
    by Chad."

NOTE: in i915 all references to 'brw' are replaced by 'intel'

Marshmallow-x86 boots ok with the following results of Android CTS.

Android CTS 6.0_r7 build:2906653
Session     Pass       Fail     Not Executed
0(EGL)      1410       24       0
1(GLES2)    13832      82       0

I get the same results as per i965GM.

[Emil Velikov: Include Mauro's test results]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 15:43:57 +01:00
Mauro Rossi d11515ff1b i915/sync: Implement DRI2_Fence extension
Here is the porting of corresponding patch for i965,
i.e. commit c636284 i965/sync: Implement DRI2_Fence extension

Here follows part of original commit message by Chad Versace:

"This enables EGL_KHR_fence_sync and EGL_KHR_wait_sync."

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-10-14 15:43:53 +01:00