Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Web GL API safelisting: Web GL 1.0 vs. 2.0 #168

Open
domenic opened this issue Feb 14, 2017 · 7 comments
Open

Web GL API safelisting: Web GL 1.0 vs. 2.0 #168

domenic opened this issue Feb 14, 2017 · 7 comments
Labels

Comments

@domenic
Copy link
Member

domenic commented Feb 14, 2017

My understanding is that several browsers have implemented or are implementing Web GL 2.0. Additionally, I would have to assume that the editors do not accept changes to Web GL 1.0, only 2.0. (Is that true?)

Should https://tc39.github.io/ecmascript_sharedmem/dom_shmem.html#webgl be updated to target Web GL 2.0?

@lars-t-hansen
Copy link
Collaborator

Yeah, probably. See #38 (comment) et seq for an older discussion. Basically this is stalled on making progress on the WebIDL side, where (last time I looked) there was disagreement between you, Anne, and Boris about how to frame the types.

@domenic
Copy link
Member Author

domenic commented Feb 14, 2017

We're all good now :). The plan is to get whatwg/webidl#286 merged and then we can define [AllowShared] to apply to the binary data types, and add [AllowShared] as appropriate.

@lars-t-hansen
Copy link
Collaborator

Makes me happy :)

@domenic
Copy link
Member Author

domenic commented May 1, 2017

So we're getting [AllowShared] ready in whatwg/webidl#353. But it's becoming more and more pressing to have some sort of comprehensive list of APIs that will use it, so that browsers can all be on the same page and we can write tests. /cc @binji

I'll work on a PR for the Web GL spec.

@binji
Copy link

binji commented May 1, 2017

I landed this a couple of weeks ago in Chrome, enabling WebGL 1 and 2 APIs. The tests I added were just surface-level -- ensuring that you could pass a SharedArrayBuffer view through to the API without it throwing an exception. Conveniently, all WebGL APIs set an error instead, so it wasn't necessary to have valid data passed to the functions (just valid types).

@annevk
Copy link
Member

annevk commented May 2, 2017

What does it mean to set an error? Shouldn't we also have tests that demonstrate it actually works?

@lars-t-hansen
Copy link
Collaborator

As I noted over in the WebGL issue, KhronosGroup/WebGL#2387, aggressively (for the lack of a better word) annotating everything with [AllowShared] is maybe a little risky. What we had with the WebGL 1.0 changes was the minimum @juj was able to get away with needing for asm.js/wasm.

(I have zero WebGL chops so it's hard for me to say what is (a) desirable or (b) risky. I just want to advocate a go-slow approach backed by implementation experience in each case.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants