Skip to content

Add draft text/wgsl media type registration. WGSL uses UTF-8 - #3542

Merged
dneto0 merged 6 commits into
gpuweb:mainfrom
dneto0:issue-1682
Oct 31, 2022
Merged

dneto0 merged 6 commits into
gpuweb:mainfrom
dneto0:issue-1682

Conversation

@dneto0

@dneto0 dneto0 commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

Fixes: #1682 #565

@dneto0 dneto0 added the wgsl WebGPU Shading Language Issues label Oct 20, 2022
@dneto0 dneto0 added this to the V1.0 milestone Oct 20, 2022
@github-actions

github-actions Bot commented Oct 20, 2022 •

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (48791e8):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@dneto0

dneto0 commented Oct 20, 2022

Copy link
Copy Markdown
Contributor Author

For next steps see #1682 (comment)


Optional parameters: None

Encoding considerations: binary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"binary" is used here. The other options are:
7bit: for 7bit text
8bit: for 8bit text separated by CR/LF. But UTF-8 doesn't fit that.
binary: all 8 bits in each octet must be preserved. text/javascript uses "binary"
framed: For framed binary data


Magic number(s): None
File extension(s): .wgsl
Macintosh file type code(s): TEXT

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For Macintosh file type, I copied what text/javascript has

I guess @litherum can advise

Additional information:

Magic number(s): None
File extension(s): .wgsl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

.wgsl ok with everyone?

@mehmetoguzderin

Copy link
Copy Markdown
Member

If I may comment, I think the latest decision was to reflect the consensus about "...ignoring of BOM" (see #565 (comment)) with it, but I don't see it in the contents.

Thanks.

@annevk annevk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks for fixing this!

Comment thread wgsl/media-type-registration.txt Resolved
Comment thread wgsl/media-type-registration.txt Resolved
Comment thread wgsl/media-type-registration.txt Resolved
Comment thread wgsl/media-type-registration.txt Resolved
dneto0 and others added 4 commits October 31, 2022 13:14
Remove useless blanks

Co-authored-by: Anne van Kesteren <[email protected]>
Remove useless blanks

Co-authored-by: Anne van Kesteren <[email protected]>
Remove useless blanks

Co-authored-by: Anne van Kesteren <[email protected]>
Remove useless blanks

Co-authored-by: Anne van Kesteren <[email protected]>
@dneto0

dneto0 commented Oct 31, 2022

Copy link
Copy Markdown
Contributor Author

If I may comment, I think the latest decision was to reflect the consensus about "...ignoring of BOM" (see #565 (comment)) with it, but I don't see it in the contents.

Thanks.

Sorry I missed that. I had to educate myself about BOM. I found this:

A protocol SHOULD forbid use of U+FEFF as a signature for those
textual protocol elements that the protocol mandates to be always
UTF-8, the signature function being totally useless in those
cases.

WGSL falls into this case.

Follow the recommendation of RFC3629, that when a text segement
only uses UTF-8, then the byte order mark is forbidden.

@mehmetoguzderin mehmetoguzderin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you very much for your consideration of spelling of BOM with this development!

@dneto0

dneto0 commented Oct 31, 2022

Copy link
Copy Markdown
Contributor Author

Discussed in the 2022-10-25 meeting. There was no opposition.
The only discussion was about BOM, and that has been resolved above. Thanks @mehmetoguzderin

@kdashg

kdashg commented Nov 1, 2022

Copy link
Copy Markdown
Contributor
WGSL 2022-10-25 Minutes
  • AB: Happy someone else is happy. Very little opinion, just get it done. Don't know about BOM.
  • KG: Sounds like no-one is opposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define a MIME type

4 participants