mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
webgl: Make the api return the context limits and use them for validations
This allows keeping the VertexAttrib* calls asynchronous. Another option would be to do the validation in the apply() function, but that'd require us passing an unnecessary channel around and add extra synchronization. The counterpart of this is that it has to be updated when the context changes, but that's less problem.
This commit is contained in:
parent
8d7ee15ace
commit
6fcc03c965
7 changed files with 44 additions and 25 deletions
|
@ -101,6 +101,7 @@ impl WebGLShader {
|
|||
&BuiltInResources::default()).unwrap();
|
||||
match validator.compile_and_translate(&[source]) {
|
||||
Ok(translated_source) => {
|
||||
debug!("Shader translated: {}", translated_source);
|
||||
// NOTE: At this point we should be pretty sure that the compilation in the paint thread
|
||||
// will succeed.
|
||||
// It could be interesting to retrieve the info log from the paint thread though
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue