Commit Graph

74409 Commits

Author SHA1 Message Date
Jason Ekstrand 982466aeff anv/device: Remove some #ifdef'd out code
This was a left-over from the dynamic state update.
2015-10-07 09:45:49 -07:00
Jason Ekstrand 010c6efd65 vk/0.170.2: Make vkUpdateDescriptorSets return void 2015-10-07 09:44:53 -07:00
Jason Ekstrand 1a52bc3039 anv/pipeline: Add support for dynamic state in pipelines 2015-10-07 09:40:49 -07:00
Jason Ekstrand daf68a9465 vk/0.170.2: Switch to the new dynamic state model 2015-10-07 09:40:49 -07:00
Jason Ekstrand 55fcca306b anv: Add a dynamic state data structure and basic helpers 2015-10-07 09:36:27 -07:00
Jason Ekstrand 941a105954 anv/private: Add a typed_memcpy macro
This is amazingly helpful when copying arrays of things around.
2015-10-07 09:36:27 -07:00
Chad Versace b1c024a932 vk/meta: Fix -Wstrict-prototypes
In C, functions with no arguments require a void argument.
build_nir_clear_fragment_shader() lacked that.

Fixes:
  anv_meta.c:70:1: warning: function declaration isn't a prototype
  [-Wstrict-prototypes]
2015-10-07 09:10:25 -07:00
Chad Versace 6dea1a9ba1 vk/0.170.2: Merge VkAttachmentView into VkImageView 2015-10-07 09:10:25 -07:00
Chad Versace 03dd72279f vk/image: Fix retrieval of anv_surface for depthstencil aspect
If anv_image_get_surface_for_aspect_mask() is given a combined
depthstencil aspect mask, and the image has a stencil surface but no
depth surface, then return the stencil surface.

Hacks on hacks.
2015-10-07 09:10:25 -07:00
Brian Paul 6ed8fd3d67 svga: whitespace fixes in svga_sampler_view.c 2015-10-07 08:45:56 -06:00
Brian Paul 70c4cde453 svga: whitespace fixes in svga_resource_buffer.c 2015-10-07 08:45:56 -06:00
Stefan Dösinger a2bc4a7b04 mesa: Remove GL_ARB_sampler_object depth compare error checking.
Version 3: Simplify the code comment, word wrap commit description.

Version 2: Return GL_FALSE if ARB_shadow is unsupported instead of
pretending to store the value as suggested by Brian Paul.

This fixes a GL error warning on r200 in Wine.

The GL_ARB_sampler_objects extension does not specify a dependency on
GL_ARB_shadow or GL_ARB_depth_texture for setting the depth texture
compare mode and function. Silently ignore attempts to change these
settings. They won't matter without a depth texture being assigned
anyway.

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-10-07 08:45:56 -06:00
Brian Paul 2bad030ac9 svga: round UBO constant buffer size up/down to multiple of 16 bytes
The svga3d device requires constant buffers to be a multiple of 16 bytes
in size.  OpenGL UBOs may not fit that restriction.  As a work-around,
round the size up if possible, else round down.

Note that this patch only effects UBO constant buffers (index 1 or higher),
not the 0th/default constant buffer.

Fixes the game Grim Fandango Remastered.  VMware bug 1510130.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2015-10-07 08:45:56 -06:00
Chad Versace 85ff3cfde3 vk: Drop -Wextra
Eliminates lots of warnings due to anv_meta.c's inclusion of nir.h.

I like the extra warnings, and they should probably get fixed. However,
git-grep reveals that no other Mesa directory uses -Wextra. Building
Vulkan produces a lot of compiler warnings from core Mesa headers that
no other Mesa developer sees, and hence no other Mesa developer will
fix.
2015-10-07 07:28:46 -07:00
Emil Velikov 4ea5ed9f51 egl/dri2: enable EGL_KHR_gl_colorspace for swrast
No driver changes needed for softpipe/llvmpipe - things just work.

v2: Whitespace fixes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Boyan Ding <boyan.j.ding@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-07 15:18:03 +01:00
Emil Velikov 858f2f2ae6 egl/dri2: ease srgb __DRIconfig conditionals
One can simplify the if-else chain, by declaring the driconfigs as a
two sized array, whist using srgb as a index to the correct entry.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-07 15:17:57 +01:00
Emil Velikov b69cfbdf18 mesa: enable KHR_debug for ES contexts
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-07 15:08:50 +01:00
Matthew Waters 70643a1389 main/get: make KHR_debug enums available everywhere
Move all the enums but CONTEXT_FLAGS. The spec seems quite explicit
about the latter (wrt OpenGL ES)

    "In OpenGL ES versions prior to and including ES 3.1 there is no
    CONTEXT_FLAGS state and therefore the CONTEXT_FLAG_DEBUG_BIT cannot
    be queried."

v2 [Emil Velikov] Rebase.
v3 [Emil Veliokv] Drop the CONTEXT_FLAGS hunk - not applicable for GLES

Signed-off-by: Matthew Waters <ystreet00@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-07 15:07:01 +01:00
Matthew Waters ae6ff72f5a glapi: add function pointers for KHR_debug for gles
v2 [Emil Velikov]
 - Rebase.
 - Correct version in gles11 dispatch_sanity.
 - Move the extension enable to a separate patch.

Signed-off-by: Matthew Waters <ystreet00@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-07 15:07:01 +01:00
Varad Gautam deb1765ec6 egl: move memcpy to bring conf->base operations together
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-07 15:05:28 +01:00
Varad Gautam f988eff379 egl: restore surface type before linking config to its display
commit c2c2e9a (egl: implement EGL_KHR_gl_colorspace (v2)) leaves
_EGLConfig->SurfaceType set incorrectly before calling _eglLinkConfig(),
and the bad value is passed around to platform_android. set it to zero
as earlier.

v2: Set SurfaceType to 0, rather than surface_type (Suggested by Emil)

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91596
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-07 15:05:20 +01:00
Ilia Mirkin 47d11990b2 nouveau: make sure there's always room to emit a fence
I started seeing a lot of situations on nv30 where fence emission
wouldn't fit into the previous buffer (causing assertions). This ensures
that whenever checking for space, we always leave a bit of extra room
for the fence emission commands. Adjusts the nv30 and nvc0 fence
emission logic to bypass the space checking as well.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2015-10-07 04:30:05 -04:00
Chad Versace 24de3d49ea vk: Embed two surface states in anv_image_view
This prepares for merging VkAttachmentView into VkImageView.  The two
surface states are:

   anv_image_view::color_rt_surface_state:
       RENDER_SURFACE_STATE when using image as a color render target.

   anv_image_view::nonrt_surface_state;
       RENDER_SURFACE_STATE when using image as a non render target.

No Crucible regressions.
2015-10-06 21:22:18 -07:00
Chad Versace 37bf120930 vk/pipeline: Emit MSAA finishme only if samples > 1
If samples == 1, then there's nothing for Mesa to do, and the finishme
message is only noise.
2015-10-06 21:22:18 -07:00
Chad Versace 3fc2b1f325 vk: Remove stale finishme for stencil image views
They don't work completely. But they work well enough to satisfy
Crucible.
2015-10-06 21:22:18 -07:00
Chad Versace 44143a1f46 vk: Add anv_image::usage
It's a copy of VkImageCreateInfo::usage. Will be used for the
VkAttachmentView/VkImageView merge.
2015-10-06 21:22:18 -07:00
Chad Versace cf603714cb vk/meta: Fix usage flags for image-wrapped-buffers
In make_image_for_buffer(), use VK_IMAGE_USAGE_SAMPLED_BIT when
transferring from the buffer and use VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
when transferring to the buffer.
2015-10-06 21:22:18 -07:00
Chad Versace d00718104f vk/image: Remove stale anv_asserts for depthstencil attachments
We don't fully handle mipmapped, array depthstencil attachments. But we
handle the well enough for Crucible's miptree tests.
2015-10-06 21:22:18 -07:00
Boyan Ding 64d9d4b730 vc4: use nir two-sided-color lowering
Similar to 9ffc1049ca (freedreno/ir3: use nir two-sided-color lowering).
No piglit regression.

Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-10-06 16:34:07 -07:00
Eric Anholt b6cd39fc47 vc4: Fix a leak of the last color read/write surface on context destroy. 2015-10-06 16:32:03 -07:00
Eric Anholt 922e0680f9 vc4: Fix a memory leak in the simulator case.
We validate per draw call, and need to free the shader per draw call, too.
2015-10-06 16:29:14 -07:00
Kristian Høgsberg Kristensen 1d7ef82f4b i965: Delete brw_cs.cpp which was deleted in master 2015-10-06 15:20:19 -07:00
Jason Ekstrand c272bb58f5 nir/spirv: Better texture handling 2015-10-06 15:10:45 -07:00
Jason Ekstrand ccea9cc332 nir/spirv: Update to SPIR-V Rev. 32 2015-10-06 14:52:35 -07:00
Jason Ekstrand 89eebd889c vk/0.170.2: Fairly trivial enum shuffling 2015-10-06 14:08:08 -07:00
Jason Ekstrand 1e4263b7d2 vk/0.170.2: s/baseArraySlice/baseArrayLayer/ 2015-10-06 14:08:08 -07:00
Mark Janes 3861010213 mesa: remove unneeded #include of colormac.h
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-06 12:36:32 -07:00
Mark Janes 3475b68abd radeon/r200: remove unneeded #include of colormac.h
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-06 12:36:32 -07:00
Mark Janes eb6b80842f i965: remove unneeded #include of colormac.h
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-06 12:36:32 -07:00
Mark Janes 83f9f911b2 i915: remove unneeded #include of colormac.h
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-06 12:36:32 -07:00
Chad Versace d4446a7e58 vk: Merge anv_attachment_view into anv_image_view
This prepares for merging VkAttachmentView into VkImageView.
2015-10-06 12:13:03 -07:00
Chad Versace 6b5ce5daf5 vk: Update comments for anv_image_view
- Document the extent member. It's the extent of the view's base level.
- s/VkAttachmentView/VkImageView/
2015-10-06 12:12:52 -07:00
Ville Syrjälä 3bcc780126 i915: Drop broken front_buffer_reading/drawing optimization
Bring the following commit over to i915:
 commit ec542d7457
 Author: Eric Anholt <eric@anholt.net>
 Date:   Mon Mar 3 10:43:10 2014 -0800

    i965: Drop broken front_buffer_reading/drawing optimization.

Not sure if it might fix anything, but since the i965 and i915 used to
share a bunch of that code, it would seem reasonable the same problems
could be present in the i915 code still, and the i965 approach is well
tested by now so bringing it over seems fairly safe.

No piglit regressions on 855.

v2: Rebase on _mesa_is_front_buffer_* refactor.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-06 11:36:37 -07:00
Ian Romanick ea8b77e892 mesa/i965: Refactor brw_is_front_buffer_{drawing,reading} to common code
There are multiple similar implementations of these functions, and a
later patch was going to add another.

v2: Move removing intel_framebuffer to a different patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-06 11:36:37 -07:00
Ian Romanick 5c4ef9f1d2 st/mesa: Don't override NewFramebuffer just to call _mesa_new_framebuffer
v2: Since state_tracker does not call _mesa_init_driver_functions, we
need to initialize the dd::NewFramebuffer pointer to
_mesa_new_framebuffer here.  Suggested by Brian.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-10-06 11:36:37 -07:00
Ian Romanick df75babf74 radeon: Don't override NewFramebuffer just to call _mesa_new_framebuffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-06 11:36:32 -07:00
Ian Romanick e32a6590a4 i915: Don't override NewFramebuffer just to call _mesa_new_framebuffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-10-06 11:28:00 -07:00
Ian Romanick ed7f00f564 i965: Don't override NewFramebuffer just to call _mesa_new_framebuffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-10-06 11:27:45 -07:00
Ville Syrjälä 021f15816e i830: Fix culling with user fbos on gen2
Flip the cull bits when rendering to a user fbo on gen2. This
was already done on gen3 (since before git history starts)
but was missing from the gen2 code.

Fixes rendering of the driver+kart model in supertuxkart kart
selection screen.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-06 11:16:19 -07:00
Ville Syrjälä 3e2c7ca773 i915: Adjust line size limits
The hardware can draw lines 0.5 to 7.5 pixels wide. Adjust the limits
to 1.0-7.0. The old limits seems to be from the era when i915 and i965
were sharing this code.

Not really sure if 1.0-7.0 is correct. Maybe it could be 0.5.7.5 as
those are the hw limits, or maybe some combination of the two?

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-10-06 11:16:19 -07:00