Skip to content

Commit

Permalink
fix: Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
REASY committed Feb 3, 2023
1 parent 81ccfe8 commit 733899b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions wgpu-hal/src/gles/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,10 @@ impl super::Device {
binding_array: BoundsCheckPolicy::Unchecked,
};

let update_naga_options = primitive_topology == Some(wgt::PrimitiveTopology::PointList)
&& naga_stage == naga::ShaderStage::Vertex;
// Update naga options if mesh consist of point list and it is vertex shader
let maybe_update_naga_options = if Some(wgt::PrimitiveTopology::PointList)
== primitive_topology
&& naga_stage == naga::ShaderStage::Vertex
{
let naga_options = if update_naga_options {
let mut wrt_flags = context.layout.naga_options.writer_flags;
wrt_flags.set(glsl::WriterFlags::FORCE_POINT_SIZE, true);
glsl::Options {
Expand All @@ -264,7 +263,7 @@ impl super::Device {
&mut output,
&shader.module,
&shader.info,
&maybe_update_naga_options,
&naga_options,
&pipeline_options,
policies,
)
Expand Down

0 comments on commit 733899b

Please sign in to comment.