mesa.git
8 years agoanv/queue: Get rid of the serial
Jason Ekstrand [Thu, 8 Oct 2015 19:15:58 +0000 (12:15 -0700)]
anv/queue: Get rid of the serial

This was a remnant of the object tagging implementation we had at one
point.  We haven't used it for a long time so there's no good reason to
keep it around.

8 years agovk/0.170.2: Update to the new VK_EXT_KHR_swapchain extensions
Jason Ekstrand [Wed, 7 Oct 2015 21:13:55 +0000 (14:13 -0700)]
vk/0.170.2: Update to the new VK_EXT_KHR_swapchain extensions

8 years agoMerge branch 'vulkan-0.170.2' into vulkan
Chad Versace [Wed, 7 Oct 2015 18:48:29 +0000 (11:48 -0700)]
Merge branch 'vulkan-0.170.2' into vulkan

This updates the API from 0.138.2 to 0.170.2,
and updates SPIR-V to v32.

8 years agovk: Remove temporary vulkan headers
Chad Versace [Wed, 7 Oct 2015 18:45:48 +0000 (11:45 -0700)]
vk: Remove temporary vulkan headers

Remove vulkan-0.138.2.h and vulkan-0.170.2.h. Their purpose was to aid
the header update to 0.170.2.

8 years agovk/0.170.2: Bump header version
Chad Versace [Wed, 7 Oct 2015 18:44:44 +0000 (11:44 -0700)]
vk/0.170.2: Bump header version

The header is now fully updated.

8 years agovk/0.170.2: Update C++ errata and typedefs
Chad Versace [Wed, 7 Oct 2015 18:43:13 +0000 (11:43 -0700)]
vk/0.170.2: Update C++ errata and typedefs

8 years agovk/0.170.2: Update remaining enums
Chad Versace [Wed, 7 Oct 2015 18:39:49 +0000 (11:39 -0700)]
vk/0.170.2: Update remaining enums

8 years agovk/0.170.2: Update VkResult
Chad Versace [Wed, 7 Oct 2015 18:36:51 +0000 (11:36 -0700)]
vk/0.170.2: Update VkResult

Version 0.170.2 removes most of the error enums. In many cases, I had to
replace an error with a less accurate (or even incorrect) one.
In other cases, the error path is replaced with an assertion.

8 years agovk/0.170: Update VkDescriptorInfo
Chad Versace [Wed, 7 Oct 2015 17:58:55 +0000 (10:58 -0700)]
vk/0.170: Update VkDescriptorInfo

Ignore the new bufferInfo field with a anv_finishme.

8 years agovk/0.170.2: Update vkCreateDescriptorPool
Chad Versace [Wed, 7 Oct 2015 17:45:41 +0000 (10:45 -0700)]
vk/0.170.2: Update vkCreateDescriptorPool

Nothing to do. In Mesa the pool is a stub.

8 years agovk/0.170.2: Update VkAttachmentDescription
Chad Versace [Wed, 7 Oct 2015 17:44:40 +0000 (10:44 -0700)]
vk/0.170.2: Update VkAttachmentDescription

8 years agovk/0.170.2: Update VkImageViewCreateInfo
Chad Versace [Wed, 7 Oct 2015 17:43:44 +0000 (10:43 -0700)]
vk/0.170.2: Update VkImageViewCreateInfo

8 years agovk/0.170.2: Update VkImageCreateInfo
Chad Versace [Wed, 7 Oct 2015 17:42:59 +0000 (10:42 -0700)]
vk/0.170.2: Update VkImageCreateInfo

8 years agovk/0.170.2: Update VkPhysicalDeviceProperties
Chad Versace [Wed, 7 Oct 2015 17:36:46 +0000 (10:36 -0700)]
vk/0.170.2: Update VkPhysicalDeviceProperties

8 years agovk/0.170.2: Update VkImageFormatProperties
Chad Versace [Wed, 7 Oct 2015 17:28:30 +0000 (10:28 -0700)]
vk/0.170.2: Update VkImageFormatProperties

8 years agovk/0.170.2: Update VkFormatProperties
Chad Versace [Wed, 7 Oct 2015 17:15:59 +0000 (10:15 -0700)]
vk/0.170.2: Update VkFormatProperties

8 years agovk/0.170.2: Update VkPhysicalDeviceFeatures
Chad Versace [Wed, 7 Oct 2015 17:05:02 +0000 (10:05 -0700)]
vk/0.170.2: Update VkPhysicalDeviceFeatures

8 years agovk/0.170.2: Update VkPhysicalDeviceLimits
Chad Versace [Wed, 7 Oct 2015 16:57:51 +0000 (09:57 -0700)]
vk/0.170.2: Update VkPhysicalDeviceLimits

8 years agoanv/device: Remove some #ifdef'd out code
Jason Ekstrand [Wed, 7 Oct 2015 16:45:47 +0000 (09:45 -0700)]
anv/device: Remove some #ifdef'd out code

This was a left-over from the dynamic state update.

8 years agovk/0.170.2: Make vkUpdateDescriptorSets return void
Jason Ekstrand [Wed, 7 Oct 2015 16:44:51 +0000 (09:44 -0700)]
vk/0.170.2: Make vkUpdateDescriptorSets return void

8 years agoanv/pipeline: Add support for dynamic state in pipelines
Jason Ekstrand [Wed, 7 Oct 2015 16:28:21 +0000 (09:28 -0700)]
anv/pipeline: Add support for dynamic state in pipelines

8 years agovk/0.170.2: Switch to the new dynamic state model
Jason Ekstrand [Wed, 7 Oct 2015 00:21:44 +0000 (17:21 -0700)]
vk/0.170.2: Switch to the new dynamic state model

8 years agoanv: Add a dynamic state data structure and basic helpers
Jason Ekstrand [Wed, 7 Oct 2015 16:31:53 +0000 (09:31 -0700)]
anv: Add a dynamic state data structure and basic helpers

8 years agoanv/private: Add a typed_memcpy macro
Jason Ekstrand [Wed, 7 Oct 2015 16:27:31 +0000 (09:27 -0700)]
anv/private: Add a typed_memcpy macro

This is amazingly helpful when copying arrays of things around.

8 years agovk/meta: Fix -Wstrict-prototypes
Chad Versace [Wed, 7 Oct 2015 16:09:37 +0000 (09:09 -0700)]
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]

8 years agovk/0.170.2: Merge VkAttachmentView into VkImageView
Chad Versace [Wed, 7 Oct 2015 14:30:52 +0000 (07:30 -0700)]
vk/0.170.2: Merge VkAttachmentView into VkImageView

8 years agovk/image: Fix retrieval of anv_surface for depthstencil aspect
Chad Versace [Wed, 7 Oct 2015 16:03:47 +0000 (09:03 -0700)]
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.

8 years agovk: Drop -Wextra
Chad Versace [Wed, 7 Oct 2015 14:28:46 +0000 (07:28 -0700)]
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.

8 years agovk: Embed two surface states in anv_image_view
Chad Versace [Wed, 7 Oct 2015 02:11:58 +0000 (19:11 -0700)]
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.

8 years agovk/pipeline: Emit MSAA finishme only if samples > 1
Chad Versace [Wed, 7 Oct 2015 01:55:16 +0000 (18:55 -0700)]
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.

8 years agovk: Remove stale finishme for stencil image views
Chad Versace [Wed, 7 Oct 2015 01:53:29 +0000 (18:53 -0700)]
vk: Remove stale finishme for stencil image views

They don't work completely. But they work well enough to satisfy
Crucible.

8 years agovk: Add anv_image::usage
Chad Versace [Wed, 7 Oct 2015 01:17:09 +0000 (18:17 -0700)]
vk: Add anv_image::usage

It's a copy of VkImageCreateInfo::usage. Will be used for the
VkAttachmentView/VkImageView merge.

8 years agovk/meta: Fix usage flags for image-wrapped-buffers
Chad Versace [Wed, 7 Oct 2015 01:34:37 +0000 (18:34 -0700)]
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.

8 years agovk/image: Remove stale anv_asserts for depthstencil attachments
Chad Versace [Wed, 7 Oct 2015 01:18:47 +0000 (18:18 -0700)]
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.

8 years agoi965: Delete brw_cs.cpp which was deleted in master
Kristian Høgsberg Kristensen [Fri, 2 Oct 2015 21:38:10 +0000 (14:38 -0700)]
i965: Delete brw_cs.cpp which was deleted in master

8 years agonir/spirv: Better texture handling
Jason Ekstrand [Tue, 6 Oct 2015 22:10:45 +0000 (15:10 -0700)]
nir/spirv: Better texture handling

8 years agonir/spirv: Update to SPIR-V Rev. 32
Jason Ekstrand [Tue, 6 Oct 2015 21:44:38 +0000 (14:44 -0700)]
nir/spirv: Update to SPIR-V Rev. 32

8 years agovk/0.170.2: Fairly trivial enum shuffling
Jason Ekstrand [Tue, 6 Oct 2015 17:34:59 +0000 (10:34 -0700)]
vk/0.170.2: Fairly trivial enum shuffling

8 years agovk/0.170.2: s/baseArraySlice/baseArrayLayer/
Jason Ekstrand [Tue, 6 Oct 2015 17:27:50 +0000 (10:27 -0700)]
vk/0.170.2: s/baseArraySlice/baseArrayLayer/

8 years agovk: Merge anv_attachment_view into anv_image_view
Chad Versace [Tue, 6 Oct 2015 18:42:43 +0000 (11:42 -0700)]
vk: Merge anv_attachment_view into anv_image_view

This prepares for merging VkAttachmentView into VkImageView.

8 years agovk: Update comments for anv_image_view
Chad Versace [Tue, 6 Oct 2015 01:13:48 +0000 (18:13 -0700)]
vk: Update comments for anv_image_view

- Document the extent member. It's the extent of the view's base level.
- s/VkAttachmentView/VkImageView/

8 years agovk/0.170.2: Add a stage field to ShaderCreateInfo
Jason Ekstrand [Tue, 6 Oct 2015 17:20:10 +0000 (10:20 -0700)]
vk/0.170.2: Add a stage field to ShaderCreateInfo

8 years agovk/0.170.2: Rename cs to stage in ComputePipelineCreateInfo
Jason Ekstrand [Tue, 6 Oct 2015 17:11:50 +0000 (10:11 -0700)]
vk/0.170.2: Rename cs to stage in ComputePipelineCreateInfo

8 years agovk/0.170.2: Use ImageSubresourceCopy in ImageResolve
Jason Ekstrand [Tue, 6 Oct 2015 17:09:47 +0000 (10:09 -0700)]
vk/0.170.2: Use ImageSubresourceCopy in ImageResolve

8 years agovk/0.170.2: Rename fields in VkClearColorValue
Jason Ekstrand [Tue, 6 Oct 2015 17:07:47 +0000 (10:07 -0700)]
vk/0.170.2: Rename fields in VkClearColorValue

8 years agovk/0.170.2: Rework blits to use ImageSubresourceCopy
Jason Ekstrand [Tue, 6 Oct 2015 17:04:04 +0000 (10:04 -0700)]
vk/0.170.2: Rework blits to use ImageSubresourceCopy

8 years agovulkan.h: Move stuff around
Jason Ekstrand [Tue, 6 Oct 2015 16:50:01 +0000 (09:50 -0700)]
vulkan.h: Move stuff around

This has no functional change but substantially decreases the diff with the
0.170.2 header.

8 years agovk/0.170.2: Rework parameters to CmdClearDepthStencil functions
Jason Ekstrand [Tue, 6 Oct 2015 16:40:39 +0000 (09:40 -0700)]
vk/0.170.2: Rework parameters to CmdClearDepthStencil functions

8 years agovk/0.170.2: Add the flags parameter to GetPhysicalDeviceImageFormatProperties
Jason Ekstrand [Tue, 6 Oct 2015 16:37:21 +0000 (09:37 -0700)]
vk/0.170.2: Add the flags parameter to GetPhysicalDeviceImageFormatProperties

8 years agovk/0.170.2: Remove the pCount parameter from AllocDescriptorSets
Jason Ekstrand [Tue, 6 Oct 2015 16:32:01 +0000 (09:32 -0700)]
vk/0.170.2: Remove the pCount parameter from AllocDescriptorSets

8 years agovk/0.170.2: Rename extension and layer query functions
Jason Ekstrand [Tue, 6 Oct 2015 16:25:03 +0000 (09:25 -0700)]
vk/0.170.2: Rename extension and layer query functions

8 years agovk/0.170.2: Update to the new queue family properties query
Jason Ekstrand [Tue, 6 Oct 2015 04:17:12 +0000 (21:17 -0700)]
vk/0.170.2: Update to the new queue family properties query

8 years agovk/0.170.2: Re-arrange parameters of vkCmdDraw[Indexed]
Jason Ekstrand [Tue, 6 Oct 2015 04:10:20 +0000 (21:10 -0700)]
vk/0.170.2: Re-arrange parameters of vkCmdDraw[Indexed]

8 years agovk/0.170.2: Make destructors return void
Jason Ekstrand [Tue, 6 Oct 2015 03:50:51 +0000 (20:50 -0700)]
vk/0.170.2: Make destructors return void

8 years agovk/0.170.2: Rename VkClearValue.ds to depthStencil
Jason Ekstrand [Tue, 6 Oct 2015 03:35:08 +0000 (20:35 -0700)]
vk/0.170.2: Rename VkClearValue.ds to depthStencil

8 years agovk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo
Jason Ekstrand [Tue, 6 Oct 2015 03:30:53 +0000 (20:30 -0700)]
vk/0.170.2: Add the subpass field to VkCmdBufferBeginInfo

8 years agovk/0.170.2: Rename pointer parameters of VkSubpassDescription
Jason Ekstrand [Tue, 6 Oct 2015 03:26:21 +0000 (20:26 -0700)]
vk/0.170.2: Rename pointer parameters of VkSubpassDescription

8 years agovk/0.170.2: Add unnormalizedCoordinates to VkSamplerCreateInfo
Jason Ekstrand [Tue, 6 Oct 2015 03:17:24 +0000 (20:17 -0700)]
vk/0.170.2: Add unnormalizedCoordinates to VkSamplerCreateInfo

8 years agovk/0.170.2: Rename VkTexAddress to VkTexAddressMode
Jason Ekstrand [Tue, 6 Oct 2015 03:15:06 +0000 (20:15 -0700)]
vk/0.170.2: Rename VkTexAddress to VkTexAddressMode

8 years agovulkan.h: Various cosmetic changes
Jason Ekstrand [Tue, 6 Oct 2015 03:06:05 +0000 (20:06 -0700)]
vulkan.h: Various cosmetic changes

These don't affect the driver in any way.

8 years agovk: Merge anv_*_attachment_view into anv_attachment_view
Chad Versace [Tue, 6 Oct 2015 00:27:38 +0000 (17:27 -0700)]
vk: Merge anv_*_attachment_view into anv_attachment_view

Remove anv_color_attachment_view and anv_depth_stencil_view, merging
them into anv_attachment_view. This prepares for merging
VkAttachmentView into VkImageView.

8 years agovk: Drop anv_attachment_view::extent
Chad Versace [Mon, 5 Oct 2015 23:58:25 +0000 (16:58 -0700)]
vk: Drop anv_attachment_view::extent

It's duplicated by anv_attachment_view::image_view::extent.

8 years agovk: Drop anv_surface_view
Chad Versace [Mon, 5 Oct 2015 23:24:53 +0000 (16:24 -0700)]
vk: Drop anv_surface_view

Push the members of struct anv_surface_view into anv_image_view and
anv_buffer_view, then remove struct anv_surface_view. Observe that
anv_surface_view::range is not needed for anv_image_view, and so was
dropped there.

This prepares for the merge of VkAttachmentView into VkImageView. Remove
the common parent of anv_buffer_view and anv_image_view (that is,
anv_surface_view) will make the merge easier.

8 years agovk: Use consistent names for anv_*_view variables
Chad Versace [Mon, 5 Oct 2015 22:49:10 +0000 (15:49 -0700)]
vk: Use consistent names for anv_*_view variables

Rename all anv_*_view variables to follow this convention:
    - sview -> anv_surface_view
    - bview -> anv_buffer_view
    - iview -> anv_image_view
    - aview -> anv_attachment_view
    - cview -> anv_color_attachment_view
    - ds_view -> anv_depth_stencil_attachment_view

This clarifies existing code. And it will reduce noise in the upcoming
commits that merge VkAttachmentView into VkImageView.

8 years agovk: Unionize anv_desciptor
Chad Versace [Mon, 5 Oct 2015 21:43:23 +0000 (14:43 -0700)]
vk: Unionize anv_desciptor

For a given struct anv_descriptor, all members are NULL (in which case
the descriptor is empty) or exactly one member is non-NULL.
To make struct anv_descriptor better reflect its set of valid states,
convert the struct into a tagged union.

8 years agovk: Drop dependency on no longer extant header
Chad Versace [Tue, 6 Oct 2015 00:02:42 +0000 (17:02 -0700)]
vk: Drop dependency on no longer extant header

anv_meta no longer uses GLSL shaders, and the build system no longer
converts them to SPIR-V. So remove anv_meta_spirv_autogen.h from
Makefile.am.

(cherry picked from commit 2fc8122f66331e76ac436ea77ad5b57a011b188a)

8 years agovk: Drop dependency on no longer extant header
Chad Versace [Tue, 6 Oct 2015 00:02:42 +0000 (17:02 -0700)]
vk: Drop dependency on no longer extant header

anv_meta no longer uses GLSL shaders, and the build system no longer
converts them to SPIR-V. So remove anv_meta_spirv_autogen.h from
Makefile.am.

8 years agovk: Return anv_image_view_info by value
Chad Versace [Mon, 5 Oct 2015 20:22:44 +0000 (13:22 -0700)]
vk: Return anv_image_view_info by value

The struct is only 2 bytes. Returning it on the stack is better than
returning a reference into the ELF .data segment.

8 years agovk/image: Document a Vulkan spec requirement for depthstencil
Chad Versace [Mon, 5 Oct 2015 20:17:39 +0000 (13:17 -0700)]
vk/image: Document a Vulkan spec requirement for depthstencil

The Vulkan spec (git a511ba2) requires support for some combined depth
stencil formats.

8 years agovk: Annotate anv_cmd_state::gen7::index_type
Chad Versace [Mon, 5 Oct 2015 15:58:35 +0000 (08:58 -0700)]
vk: Annotate anv_cmd_state::gen7::index_type

It's the value of 3DSTATE_INDEX_BUFFER.IndexFormat.

8 years agovk: Better types for VkShaderStage, VkShaderStageFlags vars
Chad Versace [Mon, 5 Oct 2015 15:52:42 +0000 (08:52 -0700)]
vk: Better types for VkShaderStage, VkShaderStageFlags vars

In most places, the variable type was the uninformative uint32_t.

8 years agovk/0.170.2: Drop VK_BUFFER_USAGE_GENERAL
Chad Versace [Mon, 5 Oct 2015 14:18:46 +0000 (07:18 -0700)]
vk/0.170.2: Drop VK_BUFFER_USAGE_GENERAL

8 years agovk/0.170.2: Drop enum VkBufferViewType
Chad Versace [Mon, 5 Oct 2015 14:17:07 +0000 (07:17 -0700)]
vk/0.170.2: Drop enum VkBufferViewType

8 years agovk/0.170.2: Update VkImageSubresourceRange
Chad Versace [Mon, 5 Oct 2015 13:48:14 +0000 (06:48 -0700)]
vk/0.170.2: Update VkImageSubresourceRange

Replace 'aspect' with 'aspectMask'.

8 years agovk/0.170.2: Drop VK_IMAGE_USAGE_GENERAL
Chad Versace [Mon, 5 Oct 2015 13:44:30 +0000 (06:44 -0700)]
vk/0.170.2: Drop VK_IMAGE_USAGE_GENERAL

8 years agovk/0.170.2: Update VkPipelineMultisampleStateCreateInfo
Chad Versace [Sun, 4 Oct 2015 17:00:25 +0000 (10:00 -0700)]
vk/0.170.2: Update VkPipelineMultisampleStateCreateInfo

8 years agovk/0.170.2: Update Vk VkPipelineDepthStencilStateCreateInfo
Chad Versace [Sun, 4 Oct 2015 16:41:22 +0000 (09:41 -0700)]
vk/0.170.2: Update Vk VkPipelineDepthStencilStateCreateInfo

Rename member depthBoundsEnable -> depthBoundsTestEnable.

8 years agovk/0.170.2: Update VkRenderPassBeginInfo
Chad Versace [Sun, 4 Oct 2015 16:26:25 +0000 (09:26 -0700)]
vk/0.170.2: Update VkRenderPassBeginInfo

Rename members:
    attachmentCount -> clearValueCount
    pAttachmentClearValues -> pClearValues

8 years agovk/0.170.2: Drop VkBufferViewCreateInfo::viewType
Chad Versace [Sun, 4 Oct 2015 16:14:57 +0000 (09:14 -0700)]
vk/0.170.2: Drop VkBufferViewCreateInfo::viewType

8 years agovk: Copy current header to vulkan-0.138.2.h
Chad Versace [Sun, 4 Oct 2015 16:03:13 +0000 (09:03 -0700)]
vk: Copy current header to vulkan-0.138.2.h

While upgrading Mesa to the new 0.170.2 API, it's convenient to have all
three headers available in the tree:
    - vulkan-0.138.2.h, the old one
    - vulkan-0.170.2.h, the new one
    - vulkan.h, the one in transition

8 years agovk: Import header 0.170.2 header LunarG SDK
Chad Versace [Sun, 4 Oct 2015 16:01:12 +0000 (09:01 -0700)]
vk: Import header 0.170.2 header LunarG SDK

From the LunarG SDK at tag sdk-0.9.1, import vulkan.h as
vulkan-0.170.2.h. This header is the first provisional header with the
addition of minor fixes.

8 years agoMerge remote-tracking branch 'mesa-public/master' into vulkan
Jason Ekstrand [Sat, 3 Oct 2015 18:32:29 +0000 (11:32 -0700)]
Merge remote-tracking branch 'mesa-public/master' into vulkan

8 years agodocs: add news item and link release notes for 10.6.9
Emil Velikov [Sat, 3 Oct 2015 12:23:13 +0000 (13:23 +0100)]
docs: add news item and link release notes for 10.6.9

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agodocs: add sha256 checksums for 10.6.9
Emil Velikov [Sat, 3 Oct 2015 12:16:18 +0000 (13:16 +0100)]
docs: add sha256 checksums for 10.6.9

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 8957b696f9cc8a92b2c160c551c34545447ec28a)

8 years agodocs: add release notes for 10.6.9
Emil Velikov [Sat, 3 Oct 2015 11:37:15 +0000 (12:37 +0100)]
docs: add release notes for 10.6.9

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit ab9aacce2d26a802bac81fc25748320428996692)

8 years agoegl: rework handling EGL_CONTEXT_FLAGS
Matthew Waters [Mon, 14 Sep 2015 17:35:45 +0000 (18:35 +0100)]
egl: rework handling EGL_CONTEXT_FLAGS

As of version 15 of the EGL_KHR_create_context spec, debug contexts
are allowed for ES contexts.  We should allow creation instead of
erroring.

While we're here provide a more comprehensive checking for the other two
flags - ROBUST_ACCESS_BIT_KHR and FORWARD_COMPATIBLE_BIT_KHR

v2 [Emil Velikov] Rebase. Minor tweak in commit message.

Cc: Boyan Ding <boyan.j.ding@gmail.com>
Cc: Chad Versace <chad.versace@intel.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91044
Signed-off-by: Matthew Waters <ystreet00@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoi965/wm: Make compute_barycentric_interp_modes take a nir_shader and a devinfo
Jason Ekstrand [Sat, 3 Oct 2015 01:31:17 +0000 (18:31 -0700)]
i965/wm: Make compute_barycentric_interp_modes take a nir_shader and a devinfo

Now that everything comes in through NIR, we can pick this directly out of
the shader source and don't need to reference the gl_fragment_program.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965: Use nir_foreach_variable
Jason Ekstrand [Sat, 3 Oct 2015 01:16:10 +0000 (18:16 -0700)]
i965: Use nir_foreach_variable

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Add a nir_foreach_variable macro
Jason Ekstrand [Sat, 3 Oct 2015 01:15:06 +0000 (18:15 -0700)]
nir: Add a nir_foreach_variable macro

This is a common enough operation that it's nice to not have to think about
the arguments to foreach_list_typed every time.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/nir: Remove the prog parameter from brw_nir_lower_inputs
Jason Ekstrand [Fri, 2 Oct 2015 23:39:51 +0000 (16:39 -0700)]
i965/nir: Remove the prog parameter from brw_nir_lower_inputs

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoMerge remote-tracking branch 'mesa-public/master' into vulkan
Jason Ekstrand [Fri, 2 Oct 2015 23:45:48 +0000 (16:45 -0700)]
Merge remote-tracking branch 'mesa-public/master' into vulkan

8 years agoradeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2
Tom Stellard [Thu, 24 Sep 2015 16:29:56 +0000 (16:29 +0000)]
radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2

This fixes a race condition in the glx-multithreaded-shader-compile
test.

v2:
  - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
8 years agogallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2
Tom Stellard [Thu, 24 Sep 2015 15:57:02 +0000 (15:57 +0000)]
gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2

Drivers and state trackers that use LLVM for generating code, must
register the targets they use with LLVM's global TargetRegistry.
The TargetRegistry is not thread-safe, so all targets must be added
to the registry before it can be queried for target information.

When drivers and state trackers initialize their own targets, they need
a way to force gallivm to initialize its targets at the same time.
Otherwise, there can be a race condition in some multi-threaded
applications (e.g. glx-multihreaded-shader-compile in piglit),
when one thread creates a context for a driver that uses LLVM (e.g.
radeonsi) and another thread creates a gallivm context (glxContextCreate
does this).

The race happens when the driver thread initializes its LLVM targets and
then starts using the registry before the gallivm thread has a chance to
register its targets.

This patch allows users to force gallivm to register its targets by
calling the gallivm_init_llvm_targets() function.

v2:
  - Use call_once and remove mutexes and static initializations.
  - Replace gallivm_init_llvm_{begin,end}() with
    gallivm_init_llvm_targets().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
8 years agoanv/allocator: Add a sanity assertion in state stream finish.
Jason Ekstrand [Fri, 2 Oct 2015 23:24:42 +0000 (16:24 -0700)]
anv/allocator: Add a sanity assertion in state stream finish.

We assert that the block offset we got while walking the list of blocks is
actually a multiple of the block size.  If something goes wrong and the GPU
decides to stomp on the surface state buffer we can end up getting
corruptions in our list of blocks.  This assertion makes such corruptions a
crash with a meaningful message rather than an infinite loop.

8 years agoanv: Remove the GLSL -> SPIR-V scraper/converter
Jason Ekstrand [Fri, 2 Oct 2015 23:20:02 +0000 (16:20 -0700)]
anv: Remove the GLSL -> SPIR-V scraper/converter

This was very useful to get us up-and-going.  However, now that we can use
NIR directly for meta shaders, we don't need this anymore and we might as
well drop the glslc dependency.

8 years agogallium/radeon: Use call_once() when initailizing LLVM targets
Tom Stellard [Wed, 30 Sep 2015 15:00:39 +0000 (15:00 +0000)]
gallium/radeon: Use call_once() when initailizing LLVM targets

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
8 years agoanv/meta: Use NIR directly for blit shaders
Jason Ekstrand [Fri, 2 Oct 2015 23:18:44 +0000 (16:18 -0700)]
anv/meta: Use NIR directly for blit shaders

8 years agoanv/meta: Use NIR directly for clear shaders
Jason Ekstrand [Fri, 2 Oct 2015 23:18:32 +0000 (16:18 -0700)]
anv/meta: Use NIR directly for clear shaders

8 years agoanv: Add a back-door for passing NIR shaders directly into the pipeline
Jason Ekstrand [Fri, 2 Oct 2015 23:16:57 +0000 (16:16 -0700)]
anv: Add a back-door for passing NIR shaders directly into the pipeline

This will allow us to use NIR directly for meta operations rather than
having to go through SPIR-V.

8 years agoanv: Add some NIR builder helpers
Jason Ekstrand [Fri, 2 Oct 2015 23:15:51 +0000 (16:15 -0700)]
anv: Add some NIR builder helpers

These should all eventually be up-streamed.  However, since they currently
have no upstream users, they would just bitrot there.  We'll keep them
local for the time being.