[pull] master from KhronosGroup:master - #214
Open
pull[bot] wants to merge 458 commits into
Open
Conversation
This can happen for access chains into buffer objects which were marked as potentially hoisted, but it's benign in almost all cases.
Missed some cases where we did not handle the loaded type width properly.
Should be seen as a hack, but it's pragmatic in some scenarios.
The patterns where we force temporary due to invalid/overused expression -> recompile should be seen as making forward progress, and there are very rare scenarios where these recompiles can cascade into many loops. Refactor this style of logic into a new function which is equivalent to handle_invalid_expression().
Various fixes
HLSL: Make --flatten-ubo work correctly
MSL: append entry point args to local variable names to avoid conflicts
Seeing downstream errors: "spirv_common.hpp:692:19: error: unqualified call to std::move"
Qualify move as std::move
MSL: Refactor and fix use of quadgroup vs simdgroup.
HLSL: Do not emit VPOS fixup unless position is active.
Clang added -Wunqualified-std-cast-call in https://reviews.llvm.org/D119670, which warns on unqualified std::move and std::forward calls. This change qualifies these calls to allow the project to build on HEAD Clang -Werror.
Fixes numerous CTS tests of types dEQP-VK.pipeline.interface_matching.vector_length.member_of_*, passing complex nested structs between stages as stage I/O. - Make add_composite_member_variable_to_interface_block() recursive to allow struct members to contain nested structs, building up member names and access chains recursively, and only add the resulting flattened leaf members to the synthetic input and output interface blocks. - Recursively generate individual location numbers for the flattened members of the input/output block. - Replace to_qualified_member_name() with append_member_name(). - Update add_variable_to_interface_block() to support arrays as struct members, adding a member to input and output interface blocks for each element of the array. - Pass name qualifiers to add_plain_member_variable_to_interface_block() to allow struct members to be arrays of structs, building up member names and access chains, and adding multiple distinct flattened leaf members to the synthetic input and output interface blocks. - Generate individual location numbers for the individual array members of the input/output block. - SPIRVCrossDecorationInterfaceMemberIndex references the index of a member of a variable that is a struct type. The value is relative to the variable, and for structs nested within that top-level struct, the index value needs to take into consideration the members within those nested structs. - Pass var_mbr_idx to add_plain_member_variable_to_interface_block() and add_composite_member_variable_to_interface_block(), start at zero for each variable, and increment for each member or nested member within that variable. - Add unit test shaders-msl/vert/out-block-with-nested-struct-array.vert - Add unit test shaders-msl/vert/out-block-with-struct-array.vert - Add unit test shaders-msl/tese/in-block-with-nested-struct.tese
Qualify std::move.
Handle OpTerminateInvocation.
Makes codegen from typical D3D emulation SPIR-V more readable. Also makes cross compilation with NotEqual more sensible. It's very rare to actually need the strict NaN-checks in practice. Also, glslang now emits UnordNotEqual by default it seems, so give up trying to assume OrdNotEqual. Harmonize for UnordNotEqual as the sane default.
Add relax_nan_checks options.
Fixes the CTS test `dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_constant_composite` and helps with another, `dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`. Unfortunately, fixing the latter requires another change.
Undef values may be of struct type and may be used in constants. Therefore, they must be interleaved with constants and types. Fixes the rest of the Vulkan CTS test `dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`. (Please excuse the churn in the reference output; it's an inevitable result of this change.)
Fixes two more CTS tests under `dEQP-VK.spirv_assembly.instruction.compute.empty_struct.copying`.
MSL: Prevent stores to storage resources in discarded fragments.
ptr_chain was really just masking the proper i == 0 check. Be more explicit about what the check is actually doing and comment this.
MSL: SPIR-V assembly fixes
By default, the matrix would be declared as mediump, causing precision issues. Need to dispatch to two separate functions since GLSL does not support overload based on precision.
Similar concern as access chains. Objects that we cannot lower to temporaries must implicitly access all expression dependencies when they are themselves accessed.
Handle row major matrix workaround more gracefully
CFG: Handle implied access to opaque loaded values.
- Add CompilerMSL::Options::argument_buffers_tier as an enumeration to allow calling app to specify platform argument buffer tier capabilities. - Support iOS writable images in Tier2 argument buffers when specified. Tier capabilities based on recommendations from Apple engineering.
Fixed typo in CompilerGLSL::should_dereference()
Fix GCC5 build.
MSL: Add support for writable images in iOS Tier2 argument buffers.
Land PR 2080
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )