Skip to content

Disallow stores to UBOs#2651

Merged
alan-baker merged 3 commits intoKhronosGroup:masterfrom
alan-baker:ubo-store-2638
Jun 17, 2019
Merged

Disallow stores to UBOs#2651
alan-baker merged 3 commits intoKhronosGroup:masterfrom
alan-baker:ubo-store-2638

Conversation

@alan-baker
Copy link
Copy Markdown
Contributor

Fixes #2638

  • Adds a check that errors out if there is a store to a UBO in the
    Vulkan environment
    • tests

@alan-baker alan-baker requested a review from dneto0 June 3, 2019 19:34
@alan-baker alan-baker self-assigned this Jun 3, 2019
Copy link
Copy Markdown
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting fix for extra pointer-tracing cases. (In fact, it seems this tracing is a good candidate for a common function)

Other instructions can also store: many kinds of atomics, GLSL frexp and GLSL modf. I'm fine with filing an issue for those as future work.

if (spvIsVulkanEnv(_.context()->target_env) &&
storage_class == SpvStorageClassUniform) {
auto base_ptr = pointer;
while (base_ptr->opcode() == SpvOpAccessChain) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need to trace through OpInBoundsAccessChain and OpCopyObject.

Copy link
Copy Markdown
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Please rebase to resolve the conflict.

Fixes KhronosGroup#2638

* Adds a check that errors out if there is a store to a UBO in the
Vulkan environment
  * tests
* trace more instructions
* refactor tracer into separate function
@alan-baker alan-baker merged commit 400dbde into KhronosGroup:master Jun 17, 2019
@alan-baker alan-baker deleted the ubo-store-2638 branch June 17, 2019 17:36
dneto0 pushed a commit to dneto0/SPIRV-Tools that referenced this pull request Sep 14, 2024
Roll third_party/glslang/ 9db7278..f9d08a2 (6 commits)

KhronosGroup/glslang@9db7278...f9d08a2

$ git log 9db7278..f9d08a2 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 cepheus Bump revision.
2019-06-17 cepheus AST/SPV: Fix KhronosGroup#930: translate uvec4 <-> uint64 for SubgroupGeMask et. al.
2019-06-18 cepheus Bump revision.
2019-06-17 cepheus SPV: Add a switch for favoring non-NaN operands in min, max, and clamp.
2019-06-17 cepheus Bump revision.
2019-02-17 jbolz Add Float16/Int8/Int16 capabilities for private variables and function parameters

Roll third_party/googletest/ 176eccfb8..ee32b72e1 (12 commits)

google/googletest@176eccf...ee32b72

$ git log 176eccfb8..ee32b72e1 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 misterg Googletest export
2019-06-17 misterg Googletest export
2019-06-17 misterg Fixing CI break by going to bazel 0.26.1
2019-06-17 misterg Revert "testing, explicitly specify compiler"
2019-06-17 absl-team Googletest export
2019-06-17 misterg Googletest export
2019-06-17 misterg revert travis.yml, irrelevant
2019-06-17 misterg bazel 0.26.1
2019-06-17 misterg bazel 0.26.1
2019-06-17 misterg testing with bazel 0.26.1
2019-06-17 misterg testing with bazel 0.26.1
2019-06-17 misterg testing, explicitly specify compiler

Roll third_party/spirv-cross/ 146dc453b..05ea05509 (2 commits)

KhronosGroup/SPIRV-Cross@146dc45...05ea055

$ git log 146dc453b..05ea05509 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 post Make sure args.msl22 is set in test_shaders.py.
2019-06-18 post MSL: Fix path check in test_shaders.py.

Roll third_party/spirv-tools/ 59983a6..001e823 (5 commits)

KhronosGroup/SPIRV-Tools@59983a6...001e823

$ git log 59983a6..001e823 --date=short --no-merges --format='%ad %ae %s'
2019-06-18 afdx Add fuzzer pass to obfuscate constants. (KhronosGroup#2671)
2019-06-17 33432579+alan-baker Handle volatile memory semantics in upgrade (KhronosGroup#2674)
2019-06-17 33432579+alan-baker Validate Volatile memory semantics bit (KhronosGroup#2672)
2019-06-17 33432579+alan-baker Disallow stores to UBOs (KhronosGroup#2651)
2019-06-17 dneto Another fix uint -> uint32_t (KhronosGroup#2676)

Created with:
  roll-dep third_party/effcee third_party/glslang third_party/googletest third_party/re2 third_party/spirv-cross third_party/spirv-headers third_party/spirv-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validator does not catch stores to UBO

2 participants