Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spv-out] Add access and access index support #224

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

Timo-DK
Copy link
Collaborator

@Timo-DK Timo-DK commented Oct 3, 2020

Description

Add support for Expression::Access and Expression::AccessIndex.

Expression::Access:

  • Vector
  • Matrix - Will be done at a later moment.
  • Array - Will be done at a later moment.

Expression::AccessIndex:

  • Vector
  • Matrix - Will be done at a later moment.
  • Array - Will be done at a later moment.
  • Struct

WGSL test file

type Data = struct{
    [[offset(0)]] e: f32;
};

[[group(0), binding(0)]] var<uniform> u_data: Data;

[[stage(vertex)]]
fn main() -> void {
  var a: vec2<f32> = vec2<f32>(1.0, 1.0);
  
  # Expression::Access - Vector
  var b: f32 = a[0];
  
  # Expression::AccessIndex - Vector
  var c: f32 = a.x;
  
  # Expression::AccessIndex - Struct
  #var d: f32 = u_data.k;
  
  return;
}

Copy link
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

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

This is an autogenerated code review.New suggestions: 1

src/back/spv/instructions.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@monocodus monocodus bot left a comment

Choose a reason for hiding this comment

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

This is an autogenerated code review.New suggestions: 1

src/back/spv/instructions.rs Outdated Show resolved Hide resolved
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch 4 times, most recently from 0a13b9e to 053f92d Compare October 8, 2020 20:09
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch 2 times, most recently from f74cd23 to 8aca879 Compare October 17, 2020 10:36
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch 2 times, most recently from 90cf191 to d59e938 Compare November 2, 2020 19:57
@Timo-DK Timo-DK marked this pull request as ready for review November 2, 2020 20:00
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch from d59e938 to 11bf97a Compare November 2, 2020 20:02
@Timo-DK Timo-DK requested a review from kvark November 2, 2020 20:03
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch from 11bf97a to 6df8eb4 Compare November 2, 2020 20:06
src/back/spv/writer.rs Outdated Show resolved Hide resolved
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch from 6df8eb4 to 6122a8a Compare November 2, 2020 20:14
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch from ca32d9f to 4b9f155 Compare November 8, 2020 12:59
src/back/spv/writer.rs Outdated Show resolved Hide resolved
@Timo-DK Timo-DK force-pushed the spv-out-access-and-index-support branch from 4b9f155 to 179e881 Compare November 9, 2020 20:15
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Thank you!

@kvark kvark merged commit f8876da into gfx-rs:master Nov 9, 2020
@Timo-DK Timo-DK deleted the spv-out-access-and-index-support branch November 9, 2020 20:37
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.

2 participants