Skip to content

Commit 2a19037

Browse files
authored
fix(OpenGL): enable using VertexFormat::Unorm10_10_10_2 on gl (#8717)
1 parent f743106 commit 2a19037

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ By @cwfitzgerald in [#8609](https://github.com/gfx-rs/wgpu/pull/8609).
251251
- Fix race when downloading texture from compute shader pass. By @SpeedCrash100 in [#8527](https://github.com/gfx-rs/wgpu/pull/8527)
252252
- Fix double window class registration when dynamic libraries are used. By @Azorlogh in [#8548](https://github.com/gfx-rs/wgpu/pull/8548)
253253
- Fix context loss on device initialization on GL3.3-4.1 contexts. By @cwfitzgerald in [#8674](https://github.com/gfx-rs/wgpu/pull/8674).
254+
- `VertexFormat::Unorm10_10_10_2` can now be used on `gl` backends. By @mooori in [#8717](https://github.com/gfx-rs/wgpu/pull/8717).
254255

255256
#### hal
256257

tests/tests/wgpu-gpu/vertex_formats/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::num::NonZeroU64;
44

55
use wgpu::util::{BufferInitDescriptor, DeviceExt};
66

7-
use wgpu_test::{gpu_test, FailureCase, GpuTestConfiguration, TestParameters, TestingContext};
7+
use wgpu_test::{gpu_test, GpuTestConfiguration, TestParameters, TestingContext};
88

99
pub fn all_tests(vec: &mut Vec<wgpu_test::GpuTestInitializer>) {
1010
vec.extend([VERTEX_FORMATS_ALL, VERTEX_FORMATS_10_10_10_2]);
@@ -428,7 +428,6 @@ static VERTEX_FORMATS_ALL: GpuTestConfiguration = GpuTestConfiguration::new()
428428
static VERTEX_FORMATS_10_10_10_2: GpuTestConfiguration = GpuTestConfiguration::new()
429429
.parameters(
430430
TestParameters::default()
431-
.expect_fail(FailureCase::backend(wgpu::Backends::GL))
432431
.test_features_limits()
433432
.features(wgpu::Features::VERTEX_WRITABLE_STORAGE),
434433
)

wgpu-hal/src/gles/conv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub(super) fn describe_vertex_format(vertex_format: wgt::VertexFormat) -> super:
223223
Vf::Uint32x4 => (4, glow::UNSIGNED_INT, Vak::Integer),
224224
Vf::Sint32x4 => (4, glow::INT, Vak::Integer),
225225
Vf::Float32x4 => (4, glow::FLOAT, Vak::Float),
226-
Vf::Unorm10_10_10_2 => (4, glow::UNSIGNED_INT_10_10_10_2, Vak::Float),
226+
Vf::Unorm10_10_10_2 => (4, glow::UNSIGNED_INT_2_10_10_10_REV, Vak::Float),
227227
Vf::Unorm8x4Bgra => (glow::BGRA as i32, glow::UNSIGNED_BYTE, Vak::Float),
228228
Vf::Float64 | Vf::Float64x2 | Vf::Float64x3 | Vf::Float64x4 => unimplemented!(),
229229
};

0 commit comments

Comments
 (0)