Skip to content
Unverified Commit 47b9f4a2 authored by Jim Blandy's avatar Jim Blandy Committed by GitHub
Browse files

[spv-out] Writer::write_texture_coordinates: Fix result type. (#1188)

Some SPIR-V texture access instructions take coordinates as integers, others as
floats. The types of coordinates in Naga expressions generally match those in
SPIR-V, but Naga indices for arrayed textures are always integers, whereas
SPIR-V combines coordinates and array indices into a single vector, so indices
need to be cast to match the coordinate component type.

This commit makes `write_texture_coordinates` properly cast array indices to
match the coordinates' component type before combining them all into a single
result vector.

Fixes #1186.
parent fd701166
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment