Skip to content

Commit

Permalink
Increase GL MAX_PUSH_CONSTANTS from 16 to 64
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jan 12, 2023
1 parent 48fbb92 commit 47ef07c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Additionally `Surface::get_default_config` now returns an Option and returns Non
#### GLES

- Browsers that support `OVR_multiview2` now report the `MULTIVIEW` feature by @expenses in [#3121](https://github.com/gfx-rs/wgpu/pull/3121).
- `Limits::max_push_constant_size` on GLES is now 256 by @Dinnerbone in [#3374](https://github.com/gfx-rs/wgpu/pull/3374).

#### Vulkan

Expand Down
3 changes: 2 additions & 1 deletion wgpu-hal/src/gles/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ impl super::Device {
}
}

let mut uniforms: [super::UniformDesc; super::MAX_PUSH_CONSTANTS] = Default::default();
let mut uniforms: [super::UniformDesc; super::MAX_PUSH_CONSTANTS] =
[None; super::MAX_PUSH_CONSTANTS].map(|_: Option<()>| Default::default());
let count = unsafe { gl.get_active_uniforms(program) };
let mut offset = 0;

Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const MAX_TEXTURE_SLOTS: usize = 16;
const MAX_SAMPLERS: usize = 16;
const MAX_VERTEX_ATTRIBUTES: usize = 16;
const ZERO_BUFFER_SIZE: usize = 256 << 10;
const MAX_PUSH_CONSTANTS: usize = 16;
const MAX_PUSH_CONSTANTS: usize = 64;

impl crate::Api for Api {
type Instance = Instance;
Expand Down

0 comments on commit 47ef07c

Please sign in to comment.