[naga] Support local const in ImageSample.offset (#7213)

* [naga] Support local const in ImageSample.offset

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update test expect

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update test

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update test expect

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Remove docs about ImageSample.offset refering to global expr

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2025-03-07 19:56:08 +01:00 committed by GitHub
parent 12ce4e2861
commit 424fde1622
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 1298 additions and 1302 deletions

View File

@ -1259,7 +1259,7 @@ impl<'a, W: Write> Writer<'a, W> {
if global.space.initializable() && is_value_init_supported(self.module, global.ty) {
write!(self.out, " = ")?;
if let Some(init) = global.init {
self.write_const_expr(init)?;
self.write_const_expr(init, &self.module.global_expressions)?;
} else {
self.write_zero_init_value(global.ty)?;
}
@ -1904,7 +1904,7 @@ impl<'a, W: Write> Writer<'a, W> {
self.write_array_size(base, size)?;
}
write!(self.out, " = ")?;
self.write_const_expr(constant.init)?;
self.write_const_expr(constant.init, &self.module.global_expressions)?;
writeln!(self.out, ";")?;
Ok(())
}
@ -2654,12 +2654,16 @@ impl<'a, W: Write> Writer<'a, W> {
///
/// [`Expression`]: crate::Expression
/// [`Module`]: crate::Module
fn write_const_expr(&mut self, expr: Handle<crate::Expression>) -> BackendResult {
fn write_const_expr(
&mut self,
expr: Handle<crate::Expression>,
arena: &crate::Arena<crate::Expression>,
) -> BackendResult {
self.write_possibly_const_expr(
expr,
&self.module.global_expressions,
arena,
|expr| &self.info[expr],
|writer, expr| writer.write_const_expr(expr),
|writer, expr| writer.write_const_expr(expr, arena),
)
}
@ -2726,7 +2730,7 @@ impl<'a, W: Write> Writer<'a, W> {
if constant.name.is_some() {
write!(self.out, "{}", self.names[&NameKey::Constant(handle)])?;
} else {
self.write_const_expr(constant.init)?;
self.write_const_expr(constant.init, &self.module.global_expressions)?;
}
}
Expression::ZeroValue(ty) => {
@ -3033,7 +3037,7 @@ impl<'a, W: Write> Writer<'a, W> {
if tex_1d_hack {
write!(self.out, "ivec2(")?;
}
self.write_const_expr(constant)?;
self.write_const_expr(constant, ctx.expressions)?;
if tex_1d_hack {
write!(self.out, ", 0)")?;
}

View File

@ -1002,7 +1002,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
if global.space == crate::AddressSpace::Private {
write!(self.out, " = ")?;
if let Some(init) = global.init {
self.write_const_expression(module, init)?;
self.write_const_expression(module, init, &module.global_expressions)?;
} else {
self.write_default_init(module, global.ty)?;
}
@ -1112,7 +1112,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
self.write_array_size(module, base, size)?;
}
write!(self.out, " = ")?;
self.write_const_expression(module, constant.init)?;
self.write_const_expression(module, constant.init, &module.global_expressions)?;
writeln!(self.out, ";")?;
Ok(())
}
@ -2609,13 +2609,11 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
&mut self,
module: &Module,
expr: Handle<crate::Expression>,
arena: &crate::Arena<crate::Expression>,
) -> BackendResult {
self.write_possibly_const_expression(
module,
expr,
&module.global_expressions,
|writer, expr| writer.write_const_expression(module, expr),
)
self.write_possibly_const_expression(module, expr, arena, |writer, expr| {
writer.write_const_expression(module, expr, arena)
})
}
fn write_possibly_const_expression<E>(
@ -2655,7 +2653,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
if constant.name.is_some() {
write!(self.out, "{}", self.names[&NameKey::Constant(handle)])?;
} else {
self.write_const_expression(module, constant.init)?;
self.write_const_expression(module, constant.init, &module.global_expressions)?;
}
}
Expression::ZeroValue(ty) => {
@ -3178,7 +3176,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
if let Some(offset) = offset {
write!(self.out, ", ")?;
write!(self.out, "int2(")?; // work around https://github.com/microsoft/DirectXShaderCompiler/issues/5082#issuecomment-1540147807
self.write_const_expression(module, offset)?;
self.write_const_expression(module, offset, func_ctx.expressions)?;
write!(self.out, ")")?;
}

View File

@ -1429,15 +1429,16 @@ impl<W: Write> Writer<W> {
expr_handle: Handle<crate::Expression>,
module: &crate::Module,
mod_info: &valid::ModuleInfo,
arena: &crate::Arena<crate::Expression>,
) -> BackendResult {
self.put_possibly_const_expression(
expr_handle,
&module.global_expressions,
arena,
module,
mod_info,
&(module, mod_info),
|&(_, mod_info), expr| &mod_info[expr],
|writer, &(module, _), expr| writer.put_const_expression(expr, module, mod_info),
|writer, &(module, _), expr| writer.put_const_expression(expr, module, mod_info, arena),
)
}
@ -1498,7 +1499,12 @@ impl<W: Write> Writer<W> {
if constant.name.is_some() {
write!(self.out, "{}", self.names[&NameKey::Constant(handle)])?;
} else {
self.put_const_expression(constant.init, module, mod_info)?;
self.put_const_expression(
constant.init,
module,
mod_info,
&module.global_expressions,
)?;
}
}
crate::Expression::ZeroValue(ty) => {
@ -1723,7 +1729,7 @@ impl<W: Write> Writer<W> {
if let Some(offset) = offset {
write!(self.out, ", ")?;
self.put_const_expression(offset, context.module, context.mod_info)?;
self.put_expression(offset, context, true)?;
}
match gather {
@ -4178,7 +4184,7 @@ template <typename A>
};
let name = &self.names[&NameKey::Constant(handle)];
write!(self.out, "constant {ty_name} {name} = ")?;
self.put_const_expression(constant.init, module, mod_info)?;
self.put_const_expression(constant.init, module, mod_info, &module.global_expressions)?;
writeln!(self.out, ";")?;
}
@ -6149,7 +6155,7 @@ template <typename A>
}
if let Some(value) = var.init {
write!(self.out, " = ")?;
self.put_const_expression(value, module, mod_info)?;
self.put_const_expression(value, module, mod_info, &module.global_expressions)?;
}
writeln!(self.out)?;
}
@ -6354,7 +6360,12 @@ template <typename A>
match var.init {
Some(value) => {
write!(self.out, " = ")?;
self.put_const_expression(value, module, mod_info)?;
self.put_const_expression(
value,
module,
mod_info,
&module.global_expressions,
)?;
writeln!(self.out, ";")?;
}
None => {

View File

@ -996,7 +996,7 @@ impl BlockContext<'_> {
};
if let Some(offset_const) = offset {
let offset_id = self.writer.constant_ids[offset_const];
let offset_id = self.cached[offset_const];
main_instruction.add_operand(offset_id);
}

View File

@ -1225,13 +1225,11 @@ impl<W: Write> Writer<W> {
&mut self,
module: &Module,
expr: Handle<crate::Expression>,
arena: &crate::Arena<crate::Expression>,
) -> BackendResult {
self.write_possibly_const_expression(
module,
expr,
&module.global_expressions,
|writer, expr| writer.write_const_expression(module, expr),
)
self.write_possibly_const_expression(module, expr, arena, |writer, expr| {
writer.write_const_expression(module, expr, arena)
})
}
fn write_possibly_const_expression<E>(
@ -1284,7 +1282,7 @@ impl<W: Write> Writer<W> {
if constant.name.is_some() {
write!(self.out, "{}", self.names[&NameKey::Constant(handle)])?;
} else {
self.write_const_expression(module, constant.init)?;
self.write_const_expression(module, constant.init, &module.global_expressions)?;
}
}
Expression::ZeroValue(ty) => {
@ -1480,7 +1478,7 @@ impl<W: Write> Writer<W> {
if let Some(offset) = offset {
write!(self.out, ", ")?;
self.write_const_expression(module, offset)?;
self.write_const_expression(module, offset, func_ctx.expressions)?;
}
write!(self.out, ")")?;
@ -1529,7 +1527,7 @@ impl<W: Write> Writer<W> {
if let Some(offset) = offset {
write!(self.out, ", ")?;
self.write_const_expression(module, offset)?;
self.write_const_expression(module, offset, func_ctx.expressions)?;
}
write!(self.out, ")")?;
@ -1840,7 +1838,7 @@ impl<W: Write> Writer<W> {
// Write initializer
if let Some(init) = global.init {
write!(self.out, " = ")?;
self.write_const_expression(module, init)?;
self.write_const_expression(module, init, &module.global_expressions)?;
}
// End with semicolon
@ -1864,7 +1862,7 @@ impl<W: Write> Writer<W> {
self.write_type(module, module.constants[handle].ty)?;
write!(self.out, " = ")?;
let init = module.constants[handle].init;
self.write_const_expression(module, init)?;
self.write_const_expression(module, init, &module.global_expressions)?;
writeln!(self.out, ";")?;
Ok(())

View File

@ -150,10 +150,7 @@ impl ExpressionTracer<'_> {
self.expressions_used
.insert_iter([image, sampler, coordinate]);
self.expressions_used.insert_iter(array_index);
match self.global_expressions_used {
Some(ref mut used) => used.insert_iter(offset),
None => self.expressions_used.insert_iter(offset),
}
self.expressions_used.insert_iter(offset);
use crate::SampleLevel as Sl;
match *level {
Sl::Auto | Sl::Zero => {}
@ -324,9 +321,7 @@ impl ModuleMap {
adjust(sampler);
adjust(coordinate);
operand_map.adjust_option(array_index);
if let Some(ref mut offset) = *offset {
self.global_expressions.adjust(offset);
}
operand_map.adjust_option(offset);
self.adjust_sample_level(level, operand_map);
operand_map.adjust_option(depth_ref);
}

View File

@ -1700,13 +1700,7 @@ impl MacroCall {
true => {
let offset_arg = args[num_args];
num_args += 1;
match ctx.lift_up_const_expression(offset_arg) {
Ok(v) => Some(v),
Err(e) => {
frontend.errors.push(e);
None
}
}
Some(offset_arg)
}
false => None,
};

View File

@ -3110,7 +3110,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
let offset = args
.next()
.map(|arg| self.expression(arg, &mut ctx.as_global().as_const()))
.map(|arg| self.expression(arg, &mut ctx.as_const()))
.ok()
.transpose()?;

View File

@ -1522,7 +1522,7 @@ pub enum Expression {
gather: Option<SwizzleComponent>,
coordinate: Handle<Expression>,
array_index: Option<Handle<Expression>>,
/// This refers to an expression in [`Module::global_expressions`].
/// This must be a const-expression.
offset: Option<Handle<Expression>>,
level: SampleLevel,
depth_ref: Option<Handle<Expression>>,
@ -2216,9 +2216,6 @@ pub struct Function {
/// - Various expressions hold [`Type`] handles, and [`Type`]s may refer to
/// global expressions, for things like array lengths.
///
/// - [`Expression::ImageSample::offset`] refers to an expression in
/// [`Module::global_expressions`].
///
/// An [`Expression`] must occur before all other [`Expression`]s that use
/// its value.
///

View File

@ -658,7 +658,7 @@ impl FunctionInfo {
gather: _,
coordinate,
array_index,
offset: _,
offset,
level,
depth_ref,
} => {
@ -685,6 +685,7 @@ impl FunctionInfo {
Sl::Gradient { x, y } => self.add_ref(x).or(self.add_ref(y)),
};
let dref_nur = depth_ref.and_then(|h| self.add_ref(h));
let offset_nur = offset.and_then(|h| self.add_ref(h));
Uniformity {
non_uniform_result: self
.add_ref(image)
@ -692,7 +693,8 @@ impl FunctionInfo {
.or(self.add_ref(coordinate))
.or(array_nur)
.or(level_nur)
.or(dref_nur),
.or(dref_nur)
.or(offset_nur),
requirements: if level.implicit_derivatives() {
UniformityRequirements::IMPLICIT_LEVEL
} else {

View File

@ -242,7 +242,7 @@ impl super::Validator {
module: &crate::Module,
info: &FunctionInfo,
mod_info: &ModuleInfo,
global_expr_kind: &crate::proc::ExpressionKindTracker,
expr_kind: &crate::proc::ExpressionKindTracker,
) -> Result<ShaderStages, ExpressionError> {
use crate::{Expression as E, Scalar as Sc, ScalarKind as Sk, TypeInner as Ti};
@ -489,11 +489,11 @@ impl super::Validator {
// check constant offset
if let Some(const_expr) = offset {
if !global_expr_kind.is_const(const_expr) {
if !expr_kind.is_const(const_expr) {
return Err(ExpressionError::InvalidSampleOffsetExprType);
}
match *mod_info[const_expr].inner_with(&module.types) {
match resolver[const_expr] {
Ti::Scalar(Sc { kind: Sk::Sint, .. }) if num_components == 1 => {}
Ti::Vector {
size,

View File

@ -1651,7 +1651,6 @@ impl super::Validator {
module: &crate::Module,
mod_info: &ModuleInfo,
entry_point: bool,
global_expr_kind: &crate::proc::ExpressionKindTracker,
) -> Result<FunctionInfo, WithSpan<FunctionError>> {
let mut info = mod_info.process_function(fun, module, self.flags, self.capabilities)?;
@ -1740,7 +1739,7 @@ impl super::Validator {
module,
&info,
mod_info,
global_expr_kind,
&local_expr_kind,
) {
Ok(stages) => info.available_stages &= stages,
Err(source) => {

View File

@ -209,7 +209,6 @@ impl super::Validator {
handle_and_expr,
constants,
overrides,
global_expressions,
types,
local_variables,
global_variables,
@ -386,7 +385,6 @@ impl super::Validator {
(handle, expression): (Handle<crate::Expression>, &crate::Expression),
constants: &Arena<crate::Constant>,
overrides: &Arena<crate::Override>,
global_expressions: &Arena<crate::Expression>,
types: &UniqueArena<crate::Type>,
local_variables: &Arena<crate::LocalVariable>,
global_variables: &Arena<crate::GlobalVariable>,
@ -396,8 +394,6 @@ impl super::Validator {
) -> Result<(), InvalidHandleError> {
let validate_constant = |handle| Self::validate_constant_handle(handle, constants);
let validate_override = |handle| Self::validate_override_handle(handle, overrides);
let validate_const_expr =
|handle| Self::validate_expression_handle(handle, global_expressions);
let validate_type = |handle| Self::validate_type_handle(handle, types);
match *expression {
@ -447,15 +443,12 @@ impl super::Validator {
level,
depth_ref,
} => {
if let Some(offset) = offset {
validate_const_expr(offset)?;
}
handle
.check_dep(image)?
.check_dep(sampler)?
.check_dep(coordinate)?
.check_dep_opt(array_index)?;
.check_dep_opt(array_index)?
.check_dep_opt(offset)?;
match level {
crate::SampleLevel::Auto | crate::SampleLevel::Zero => (),

View File

@ -621,7 +621,6 @@ impl super::Validator {
ep: &crate::EntryPoint,
module: &crate::Module,
mod_info: &ModuleInfo,
global_expr_kind: &crate::proc::ExpressionKindTracker,
) -> Result<FunctionInfo, WithSpan<EntryPointError>> {
if ep.early_depth_test.is_some() {
let required = Capabilities::EARLY_DEPTH_TEST;
@ -650,7 +649,7 @@ impl super::Validator {
}
let mut info = self
.validate_function(&ep.function, module, mod_info, true, global_expr_kind)
.validate_function(&ep.function, module, mod_info, true)
.map_err(WithSpan::into_other)?;
{

View File

@ -713,7 +713,7 @@ impl Validator {
}
for (handle, fun) in module.functions.iter() {
match self.validate_function(fun, module, &mod_info, false, &global_expr_kind) {
match self.validate_function(fun, module, &mod_info, false) {
Ok(info) => mod_info.functions.push(info),
Err(error) => {
return Err(error.and_then(|source| {
@ -739,7 +739,7 @@ impl Validator {
.with_span()); // TODO: keep some EP span information?
}
match self.validate_entry_point(ep, module, &mod_info, &global_expr_kind) {
match self.validate_entry_point(ep, module, &mod_info) {
Ok(info) => mod_info.entry_points.push(info),
Err(error) => {
return Err(error.and_then(|source| {

View File

@ -113,26 +113,27 @@ var sampler_reg: sampler;
@fragment
fn texture_sample() -> @location(0) vec4<f32> {
let tc = vec2<f32>(0.5);
let tc3 = vec3<f32>(0.5);
const tc = vec2<f32>(0.5);
const tc3 = vec3<f32>(0.5);
const offset = vec2<i32>(3, 1);
let level = 2.3;
var a: vec4<f32>;
a += textureSample(image_1d, sampler_reg, tc.x);
a += textureSample(image_2d, sampler_reg, tc);
a += textureSample(image_2d, sampler_reg, tc, vec2<i32>(3, 1));
a += textureSampleLevel(image_2d, sampler_reg, tc, level);
a += textureSampleLevel(image_2d, sampler_reg, tc, level, vec2<i32>(3, 1));
a += textureSampleBias(image_2d, sampler_reg, tc, 2.0, vec2<i32>(3, 1));
a += textureSampleLevel(image_2d, sampler_reg, tc, level, offset);
a += textureSampleBias(image_2d, sampler_reg, tc, 2.0, offset);
a += textureSample(image_2d_array, sampler_reg, tc, 0u);
a += textureSample(image_2d_array, sampler_reg, tc, 0u, vec2<i32>(3, 1));
a += textureSample(image_2d_array, sampler_reg, tc, 0u, offset);
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, level);
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, level, vec2<i32>(3, 1));
a += textureSampleBias(image_2d_array, sampler_reg, tc, 0u, 2.0, vec2<i32>(3, 1));
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, level, offset);
a += textureSampleBias(image_2d_array, sampler_reg, tc, 0u, 2.0, offset);
a += textureSample(image_2d_array, sampler_reg, tc, 0);
a += textureSample(image_2d_array, sampler_reg, tc, 0, vec2<i32>(3, 1));
a += textureSample(image_2d_array, sampler_reg, tc, 0, offset);
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0, level);
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0, level, vec2<i32>(3, 1));
a += textureSampleBias(image_2d_array, sampler_reg, tc, 0, 2.0, vec2<i32>(3, 1));
a += textureSampleLevel(image_2d_array, sampler_reg, tc, 0, level, offset);
a += textureSampleBias(image_2d_array, sampler_reg, tc, 0, 2.0, offset);
a += textureSample(image_cube_array, sampler_reg, tc3, 0u);
a += textureSampleLevel(image_cube_array, sampler_reg, tc3, 0u, level);
a += textureSampleBias(image_cube_array, sampler_reg, tc3, 0u, 2.0);

View File

@ -13,74 +13,75 @@ void main() {
vec4 a = vec4(0.0);
vec2 tc = vec2(0.5);
vec3 tc3_ = vec3(0.5);
vec4 _e9 = texture(_group_0_binding_0_fs, tc.x);
vec4 _e10 = a;
a = (_e10 + _e9);
vec4 _e14 = texture(_group_0_binding_1_fs, vec2(tc));
vec4 _e15 = a;
a = (_e15 + _e14);
vec4 _e19 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1));
vec4 _e20 = a;
a = (_e20 + _e19);
vec4 _e24 = textureLod(_group_0_binding_1_fs, vec2(tc), 2.3);
ivec2 offset = ivec2(3, 1);
vec4 _e11 = texture(_group_0_binding_0_fs, 0.5);
vec4 _e12 = a;
a = (_e12 + _e11);
vec4 _e16 = texture(_group_0_binding_1_fs, vec2(tc));
vec4 _e17 = a;
a = (_e17 + _e16);
vec4 _e24 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1));
vec4 _e25 = a;
a = (_e25 + _e24);
vec4 _e29 = textureLodOffset(_group_0_binding_1_fs, vec2(tc), 2.3, ivec2(3, 1));
vec4 _e29 = textureLod(_group_0_binding_1_fs, vec2(tc), 2.3);
vec4 _e30 = a;
a = (_e30 + _e29);
vec4 _e35 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1), 2.0);
vec4 _e36 = a;
a = (_e36 + _e35);
vec4 _e41 = texture(_group_0_binding_4_fs, vec3(tc, 0u));
vec4 _e42 = a;
a = (_e42 + _e41);
vec4 _e47 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1));
vec4 _e48 = a;
a = (_e48 + _e47);
vec4 _e53 = textureLod(_group_0_binding_4_fs, vec3(tc, 0u), 2.3);
vec4 _e54 = a;
a = (_e54 + _e53);
vec4 _e59 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0u), 2.3, ivec2(3, 1));
vec4 _e60 = a;
a = (_e60 + _e59);
vec4 _e66 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1), 2.0);
vec4 _e67 = a;
a = (_e67 + _e66);
vec4 _e72 = texture(_group_0_binding_4_fs, vec3(tc, 0));
vec4 _e73 = a;
a = (_e73 + _e72);
vec4 _e78 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1));
vec4 _e79 = a;
a = (_e79 + _e78);
vec4 _e84 = textureLod(_group_0_binding_4_fs, vec3(tc, 0), 2.3);
vec4 _e85 = a;
a = (_e85 + _e84);
vec4 _e90 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0), 2.3, ivec2(3, 1));
vec4 _e91 = a;
a = (_e91 + _e90);
vec4 _e97 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1), 2.0);
vec4 _e98 = a;
a = (_e98 + _e97);
vec4 _e103 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u));
vec4 _e104 = a;
a = (_e104 + _e103);
vec4 _e109 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.3);
vec4 _e110 = a;
a = (_e110 + _e109);
vec4 _e116 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.0);
vec4 _e117 = a;
a = (_e117 + _e116);
vec4 _e122 = texture(_group_0_binding_6_fs, vec4(tc3_, 0));
vec4 _e123 = a;
a = (_e123 + _e122);
vec4 _e128 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0), 2.3);
vec4 _e129 = a;
a = (_e129 + _e128);
vec4 _e135 = texture(_group_0_binding_6_fs, vec4(tc3_, 0), 2.0);
vec4 _e136 = a;
a = (_e136 + _e135);
vec4 _e138 = a;
_fs2p_location0 = _e138;
vec4 _e34 = textureLodOffset(_group_0_binding_1_fs, vec2(tc), 2.3, ivec2(3, 1));
vec4 _e35 = a;
a = (_e35 + _e34);
vec4 _e40 = textureOffset(_group_0_binding_1_fs, vec2(tc), ivec2(3, 1), 2.0);
vec4 _e41 = a;
a = (_e41 + _e40);
vec4 _e46 = texture(_group_0_binding_4_fs, vec3(tc, 0u));
vec4 _e47 = a;
a = (_e47 + _e46);
vec4 _e52 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1));
vec4 _e53 = a;
a = (_e53 + _e52);
vec4 _e58 = textureLod(_group_0_binding_4_fs, vec3(tc, 0u), 2.3);
vec4 _e59 = a;
a = (_e59 + _e58);
vec4 _e64 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0u), 2.3, ivec2(3, 1));
vec4 _e65 = a;
a = (_e65 + _e64);
vec4 _e71 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0u), ivec2(3, 1), 2.0);
vec4 _e72 = a;
a = (_e72 + _e71);
vec4 _e77 = texture(_group_0_binding_4_fs, vec3(tc, 0));
vec4 _e78 = a;
a = (_e78 + _e77);
vec4 _e83 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1));
vec4 _e84 = a;
a = (_e84 + _e83);
vec4 _e89 = textureLod(_group_0_binding_4_fs, vec3(tc, 0), 2.3);
vec4 _e90 = a;
a = (_e90 + _e89);
vec4 _e95 = textureLodOffset(_group_0_binding_4_fs, vec3(tc, 0), 2.3, ivec2(3, 1));
vec4 _e96 = a;
a = (_e96 + _e95);
vec4 _e102 = textureOffset(_group_0_binding_4_fs, vec3(tc, 0), ivec2(3, 1), 2.0);
vec4 _e103 = a;
a = (_e103 + _e102);
vec4 _e108 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u));
vec4 _e109 = a;
a = (_e109 + _e108);
vec4 _e114 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.3);
vec4 _e115 = a;
a = (_e115 + _e114);
vec4 _e121 = texture(_group_0_binding_6_fs, vec4(tc3_, 0u), 2.0);
vec4 _e122 = a;
a = (_e122 + _e121);
vec4 _e127 = texture(_group_0_binding_6_fs, vec4(tc3_, 0));
vec4 _e128 = a;
a = (_e128 + _e127);
vec4 _e133 = textureLod(_group_0_binding_6_fs, vec4(tc3_, 0), 2.3);
vec4 _e134 = a;
a = (_e134 + _e133);
vec4 _e140 = texture(_group_0_binding_6_fs, vec4(tc3_, 0), 2.0);
vec4 _e141 = a;
a = (_e141 + _e140);
vec4 _e143 = a;
_fs2p_location0 = _e143;
return;
}

View File

@ -256,74 +256,75 @@ float4 texture_sample() : SV_Target0
float2 tc = (0.5).xx;
float3 tc3_ = (0.5).xxx;
float4 _e9 = image_1d.Sample(sampler_reg, tc.x);
float4 _e10 = a;
a = (_e10 + _e9);
float4 _e14 = image_2d.Sample(sampler_reg, tc);
float4 _e15 = a;
a = (_e15 + _e14);
float4 _e19 = image_2d.Sample(sampler_reg, tc, int2(int2(int(3), int(1))));
float4 _e20 = a;
a = (_e20 + _e19);
float4 _e24 = image_2d.SampleLevel(sampler_reg, tc, 2.3);
int2 offset = int2(int(3), int(1));
float4 _e11 = image_1d.Sample(sampler_reg, 0.5);
float4 _e12 = a;
a = (_e12 + _e11);
float4 _e16 = image_2d.Sample(sampler_reg, tc);
float4 _e17 = a;
a = (_e17 + _e16);
float4 _e24 = image_2d.Sample(sampler_reg, tc, int2(int2(int(3), int(1))));
float4 _e25 = a;
a = (_e25 + _e24);
float4 _e29 = image_2d.SampleLevel(sampler_reg, tc, 2.3, int2(int2(int(3), int(1))));
float4 _e29 = image_2d.SampleLevel(sampler_reg, tc, 2.3);
float4 _e30 = a;
a = (_e30 + _e29);
float4 _e35 = image_2d.SampleBias(sampler_reg, tc, 2.0, int2(int2(int(3), int(1))));
float4 _e36 = a;
a = (_e36 + _e35);
float4 _e41 = image_2d_array.Sample(sampler_reg, float3(tc, 0u));
float4 _e42 = a;
a = (_e42 + _e41);
float4 _e47 = image_2d_array.Sample(sampler_reg, float3(tc, 0u), int2(int2(int(3), int(1))));
float4 _e48 = a;
a = (_e48 + _e47);
float4 _e53 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3);
float4 _e54 = a;
a = (_e54 + _e53);
float4 _e59 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3, int2(int2(int(3), int(1))));
float4 _e60 = a;
a = (_e60 + _e59);
float4 _e66 = image_2d_array.SampleBias(sampler_reg, float3(tc, 0u), 2.0, int2(int2(int(3), int(1))));
float4 _e67 = a;
a = (_e67 + _e66);
float4 _e72 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)));
float4 _e73 = a;
a = (_e73 + _e72);
float4 _e78 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)), int2(int2(int(3), int(1))));
float4 _e79 = a;
a = (_e79 + _e78);
float4 _e84 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3);
float4 _e85 = a;
a = (_e85 + _e84);
float4 _e90 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3, int2(int2(int(3), int(1))));
float4 _e91 = a;
a = (_e91 + _e90);
float4 _e97 = image_2d_array.SampleBias(sampler_reg, float3(tc, int(0)), 2.0, int2(int2(int(3), int(1))));
float4 _e98 = a;
a = (_e98 + _e97);
float4 _e103 = image_cube_array.Sample(sampler_reg, float4(tc3_, 0u));
float4 _e104 = a;
a = (_e104 + _e103);
float4 _e109 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0u), 2.3);
float4 _e110 = a;
a = (_e110 + _e109);
float4 _e116 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, 0u), 2.0);
float4 _e117 = a;
a = (_e117 + _e116);
float4 _e122 = image_cube_array.Sample(sampler_reg, float4(tc3_, int(0)));
float4 _e123 = a;
a = (_e123 + _e122);
float4 _e128 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, int(0)), 2.3);
float4 _e129 = a;
a = (_e129 + _e128);
float4 _e135 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, int(0)), 2.0);
float4 _e136 = a;
a = (_e136 + _e135);
float4 _e138 = a;
return _e138;
float4 _e34 = image_2d.SampleLevel(sampler_reg, tc, 2.3, int2(int2(int(3), int(1))));
float4 _e35 = a;
a = (_e35 + _e34);
float4 _e40 = image_2d.SampleBias(sampler_reg, tc, 2.0, int2(int2(int(3), int(1))));
float4 _e41 = a;
a = (_e41 + _e40);
float4 _e46 = image_2d_array.Sample(sampler_reg, float3(tc, 0u));
float4 _e47 = a;
a = (_e47 + _e46);
float4 _e52 = image_2d_array.Sample(sampler_reg, float3(tc, 0u), int2(int2(int(3), int(1))));
float4 _e53 = a;
a = (_e53 + _e52);
float4 _e58 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3);
float4 _e59 = a;
a = (_e59 + _e58);
float4 _e64 = image_2d_array.SampleLevel(sampler_reg, float3(tc, 0u), 2.3, int2(int2(int(3), int(1))));
float4 _e65 = a;
a = (_e65 + _e64);
float4 _e71 = image_2d_array.SampleBias(sampler_reg, float3(tc, 0u), 2.0, int2(int2(int(3), int(1))));
float4 _e72 = a;
a = (_e72 + _e71);
float4 _e77 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)));
float4 _e78 = a;
a = (_e78 + _e77);
float4 _e83 = image_2d_array.Sample(sampler_reg, float3(tc, int(0)), int2(int2(int(3), int(1))));
float4 _e84 = a;
a = (_e84 + _e83);
float4 _e89 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3);
float4 _e90 = a;
a = (_e90 + _e89);
float4 _e95 = image_2d_array.SampleLevel(sampler_reg, float3(tc, int(0)), 2.3, int2(int2(int(3), int(1))));
float4 _e96 = a;
a = (_e96 + _e95);
float4 _e102 = image_2d_array.SampleBias(sampler_reg, float3(tc, int(0)), 2.0, int2(int2(int(3), int(1))));
float4 _e103 = a;
a = (_e103 + _e102);
float4 _e108 = image_cube_array.Sample(sampler_reg, float4(tc3_, 0u));
float4 _e109 = a;
a = (_e109 + _e108);
float4 _e114 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, 0u), 2.3);
float4 _e115 = a;
a = (_e115 + _e114);
float4 _e121 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, 0u), 2.0);
float4 _e122 = a;
a = (_e122 + _e121);
float4 _e127 = image_cube_array.Sample(sampler_reg, float4(tc3_, int(0)));
float4 _e128 = a;
a = (_e128 + _e127);
float4 _e133 = image_cube_array.SampleLevel(sampler_reg, float4(tc3_, int(0)), 2.3);
float4 _e134 = a;
a = (_e134 + _e133);
float4 _e140 = image_cube_array.SampleBias(sampler_reg, float4(tc3_, int(0)), 2.0);
float4 _e141 = a;
a = (_e141 + _e140);
float4 _e143 = a;
return _e143;
}
float texture_sample_comparison() : SV_Target0

View File

@ -126,74 +126,75 @@ fragment texture_sampleOutput texture_sample(
metal::float4 a = {};
metal::float2 tc = metal::float2(0.5);
metal::float3 tc3_ = metal::float3(0.5);
metal::float4 _e9 = image_1d.sample(sampler_reg, tc.x);
metal::float4 _e10 = a;
a = _e10 + _e9;
metal::float4 _e14 = image_2d.sample(sampler_reg, tc);
metal::float4 _e15 = a;
a = _e15 + _e14;
metal::float4 _e19 = image_2d.sample(sampler_reg, tc, metal::int2(3, 1));
metal::float4 _e20 = a;
a = _e20 + _e19;
metal::float4 _e24 = image_2d.sample(sampler_reg, tc, metal::level(2.3));
metal::int2 offset = metal::int2(3, 1);
metal::float4 _e11 = image_1d.sample(sampler_reg, 0.5);
metal::float4 _e12 = a;
a = _e12 + _e11;
metal::float4 _e16 = image_2d.sample(sampler_reg, tc);
metal::float4 _e17 = a;
a = _e17 + _e16;
metal::float4 _e24 = image_2d.sample(sampler_reg, tc, metal::int2(3, 1));
metal::float4 _e25 = a;
a = _e25 + _e24;
metal::float4 _e29 = image_2d.sample(sampler_reg, tc, metal::level(2.3), metal::int2(3, 1));
metal::float4 _e29 = image_2d.sample(sampler_reg, tc, metal::level(2.3));
metal::float4 _e30 = a;
a = _e30 + _e29;
metal::float4 _e35 = image_2d.sample(sampler_reg, tc, metal::bias(2.0), metal::int2(3, 1));
metal::float4 _e36 = a;
a = _e36 + _e35;
metal::float4 _e41 = image_2d_array.sample(sampler_reg, tc, 0u);
metal::float4 _e42 = a;
a = _e42 + _e41;
metal::float4 _e47 = image_2d_array.sample(sampler_reg, tc, 0u, metal::int2(3, 1));
metal::float4 _e48 = a;
a = _e48 + _e47;
metal::float4 _e53 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3));
metal::float4 _e54 = a;
a = _e54 + _e53;
metal::float4 _e59 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3), metal::int2(3, 1));
metal::float4 _e60 = a;
a = _e60 + _e59;
metal::float4 _e66 = image_2d_array.sample(sampler_reg, tc, 0u, metal::bias(2.0), metal::int2(3, 1));
metal::float4 _e67 = a;
a = _e67 + _e66;
metal::float4 _e72 = image_2d_array.sample(sampler_reg, tc, 0);
metal::float4 _e73 = a;
a = _e73 + _e72;
metal::float4 _e78 = image_2d_array.sample(sampler_reg, tc, 0, metal::int2(3, 1));
metal::float4 _e79 = a;
a = _e79 + _e78;
metal::float4 _e84 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3));
metal::float4 _e85 = a;
a = _e85 + _e84;
metal::float4 _e90 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3), metal::int2(3, 1));
metal::float4 _e91 = a;
a = _e91 + _e90;
metal::float4 _e97 = image_2d_array.sample(sampler_reg, tc, 0, metal::bias(2.0), metal::int2(3, 1));
metal::float4 _e98 = a;
a = _e98 + _e97;
metal::float4 _e103 = image_cube_array.sample(sampler_reg, tc3_, 0u);
metal::float4 _e104 = a;
a = _e104 + _e103;
metal::float4 _e109 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::level(2.3));
metal::float4 _e110 = a;
a = _e110 + _e109;
metal::float4 _e116 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::bias(2.0));
metal::float4 _e117 = a;
a = _e117 + _e116;
metal::float4 _e122 = image_cube_array.sample(sampler_reg, tc3_, 0);
metal::float4 _e123 = a;
a = _e123 + _e122;
metal::float4 _e128 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::level(2.3));
metal::float4 _e129 = a;
a = _e129 + _e128;
metal::float4 _e135 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::bias(2.0));
metal::float4 _e136 = a;
a = _e136 + _e135;
metal::float4 _e138 = a;
return texture_sampleOutput { _e138 };
metal::float4 _e34 = image_2d.sample(sampler_reg, tc, metal::level(2.3), offset);
metal::float4 _e35 = a;
a = _e35 + _e34;
metal::float4 _e40 = image_2d.sample(sampler_reg, tc, metal::bias(2.0), offset);
metal::float4 _e41 = a;
a = _e41 + _e40;
metal::float4 _e46 = image_2d_array.sample(sampler_reg, tc, 0u);
metal::float4 _e47 = a;
a = _e47 + _e46;
metal::float4 _e52 = image_2d_array.sample(sampler_reg, tc, 0u, offset);
metal::float4 _e53 = a;
a = _e53 + _e52;
metal::float4 _e58 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3));
metal::float4 _e59 = a;
a = _e59 + _e58;
metal::float4 _e64 = image_2d_array.sample(sampler_reg, tc, 0u, metal::level(2.3), offset);
metal::float4 _e65 = a;
a = _e65 + _e64;
metal::float4 _e71 = image_2d_array.sample(sampler_reg, tc, 0u, metal::bias(2.0), offset);
metal::float4 _e72 = a;
a = _e72 + _e71;
metal::float4 _e77 = image_2d_array.sample(sampler_reg, tc, 0);
metal::float4 _e78 = a;
a = _e78 + _e77;
metal::float4 _e83 = image_2d_array.sample(sampler_reg, tc, 0, offset);
metal::float4 _e84 = a;
a = _e84 + _e83;
metal::float4 _e89 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3));
metal::float4 _e90 = a;
a = _e90 + _e89;
metal::float4 _e95 = image_2d_array.sample(sampler_reg, tc, 0, metal::level(2.3), offset);
metal::float4 _e96 = a;
a = _e96 + _e95;
metal::float4 _e102 = image_2d_array.sample(sampler_reg, tc, 0, metal::bias(2.0), offset);
metal::float4 _e103 = a;
a = _e103 + _e102;
metal::float4 _e108 = image_cube_array.sample(sampler_reg, tc3_, 0u);
metal::float4 _e109 = a;
a = _e109 + _e108;
metal::float4 _e114 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::level(2.3));
metal::float4 _e115 = a;
a = _e115 + _e114;
metal::float4 _e121 = image_cube_array.sample(sampler_reg, tc3_, 0u, metal::bias(2.0));
metal::float4 _e122 = a;
a = _e122 + _e121;
metal::float4 _e127 = image_cube_array.sample(sampler_reg, tc3_, 0);
metal::float4 _e128 = a;
a = _e128 + _e127;
metal::float4 _e133 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::level(2.3));
metal::float4 _e134 = a;
a = _e134 + _e133;
metal::float4 _e140 = image_cube_array.sample(sampler_reg, tc3_, 0, metal::bias(2.0));
metal::float4 _e141 = a;
a = _e141 + _e140;
metal::float4 _e143 = a;
return texture_sampleOutput { _e143 };
}

File diff suppressed because it is too large Load Diff

View File

@ -114,74 +114,75 @@ fn texture_sample() -> @location(0) vec4<f32> {
const tc = vec2(0.5f);
const tc3_ = vec3(0.5f);
let _e9 = textureSample(image_1d, sampler_reg, tc.x);
let _e10 = a;
a = (_e10 + _e9);
let _e14 = textureSample(image_2d, sampler_reg, tc);
let _e15 = a;
a = (_e15 + _e14);
let _e19 = textureSample(image_2d, sampler_reg, tc, vec2<i32>(3i, 1i));
let _e20 = a;
a = (_e20 + _e19);
let _e24 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3f);
const offset = vec2<i32>(3i, 1i);
let _e11 = textureSample(image_1d, sampler_reg, 0.5f);
let _e12 = a;
a = (_e12 + _e11);
let _e16 = textureSample(image_2d, sampler_reg, tc);
let _e17 = a;
a = (_e17 + _e16);
let _e24 = textureSample(image_2d, sampler_reg, tc, vec2<i32>(3i, 1i));
let _e25 = a;
a = (_e25 + _e24);
let _e29 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3f, vec2<i32>(3i, 1i));
let _e29 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3f);
let _e30 = a;
a = (_e30 + _e29);
let _e35 = textureSampleBias(image_2d, sampler_reg, tc, 2f, vec2<i32>(3i, 1i));
let _e36 = a;
a = (_e36 + _e35);
let _e41 = textureSample(image_2d_array, sampler_reg, tc, 0u);
let _e42 = a;
a = (_e42 + _e41);
let _e47 = textureSample(image_2d_array, sampler_reg, tc, 0u, vec2<i32>(3i, 1i));
let _e48 = a;
a = (_e48 + _e47);
let _e53 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3f);
let _e54 = a;
a = (_e54 + _e53);
let _e59 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3f, vec2<i32>(3i, 1i));
let _e60 = a;
a = (_e60 + _e59);
let _e66 = textureSampleBias(image_2d_array, sampler_reg, tc, 0u, 2f, vec2<i32>(3i, 1i));
let _e67 = a;
a = (_e67 + _e66);
let _e72 = textureSample(image_2d_array, sampler_reg, tc, 0i);
let _e73 = a;
a = (_e73 + _e72);
let _e78 = textureSample(image_2d_array, sampler_reg, tc, 0i, vec2<i32>(3i, 1i));
let _e79 = a;
a = (_e79 + _e78);
let _e84 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0i, 2.3f);
let _e85 = a;
a = (_e85 + _e84);
let _e90 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0i, 2.3f, vec2<i32>(3i, 1i));
let _e91 = a;
a = (_e91 + _e90);
let _e97 = textureSampleBias(image_2d_array, sampler_reg, tc, 0i, 2f, vec2<i32>(3i, 1i));
let _e98 = a;
a = (_e98 + _e97);
let _e103 = textureSample(image_cube_array, sampler_reg, tc3_, 0u);
let _e104 = a;
a = (_e104 + _e103);
let _e109 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0u, 2.3f);
let _e110 = a;
a = (_e110 + _e109);
let _e116 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0u, 2f);
let _e117 = a;
a = (_e117 + _e116);
let _e122 = textureSample(image_cube_array, sampler_reg, tc3_, 0i);
let _e123 = a;
a = (_e123 + _e122);
let _e128 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0i, 2.3f);
let _e129 = a;
a = (_e129 + _e128);
let _e135 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0i, 2f);
let _e136 = a;
a = (_e136 + _e135);
let _e138 = a;
return _e138;
let _e34 = textureSampleLevel(image_2d, sampler_reg, tc, 2.3f, vec2<i32>(3i, 1i));
let _e35 = a;
a = (_e35 + _e34);
let _e40 = textureSampleBias(image_2d, sampler_reg, tc, 2f, vec2<i32>(3i, 1i));
let _e41 = a;
a = (_e41 + _e40);
let _e46 = textureSample(image_2d_array, sampler_reg, tc, 0u);
let _e47 = a;
a = (_e47 + _e46);
let _e52 = textureSample(image_2d_array, sampler_reg, tc, 0u, vec2<i32>(3i, 1i));
let _e53 = a;
a = (_e53 + _e52);
let _e58 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3f);
let _e59 = a;
a = (_e59 + _e58);
let _e64 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0u, 2.3f, vec2<i32>(3i, 1i));
let _e65 = a;
a = (_e65 + _e64);
let _e71 = textureSampleBias(image_2d_array, sampler_reg, tc, 0u, 2f, vec2<i32>(3i, 1i));
let _e72 = a;
a = (_e72 + _e71);
let _e77 = textureSample(image_2d_array, sampler_reg, tc, 0i);
let _e78 = a;
a = (_e78 + _e77);
let _e83 = textureSample(image_2d_array, sampler_reg, tc, 0i, vec2<i32>(3i, 1i));
let _e84 = a;
a = (_e84 + _e83);
let _e89 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0i, 2.3f);
let _e90 = a;
a = (_e90 + _e89);
let _e95 = textureSampleLevel(image_2d_array, sampler_reg, tc, 0i, 2.3f, vec2<i32>(3i, 1i));
let _e96 = a;
a = (_e96 + _e95);
let _e102 = textureSampleBias(image_2d_array, sampler_reg, tc, 0i, 2f, vec2<i32>(3i, 1i));
let _e103 = a;
a = (_e103 + _e102);
let _e108 = textureSample(image_cube_array, sampler_reg, tc3_, 0u);
let _e109 = a;
a = (_e109 + _e108);
let _e114 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0u, 2.3f);
let _e115 = a;
a = (_e115 + _e114);
let _e121 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0u, 2f);
let _e122 = a;
a = (_e122 + _e121);
let _e127 = textureSample(image_cube_array, sampler_reg, tc3_, 0i);
let _e128 = a;
a = (_e128 + _e127);
let _e133 = textureSampleLevel(image_cube_array, sampler_reg, tc3_, 0i, 2.3f);
let _e134 = a;
a = (_e134 + _e133);
let _e140 = textureSampleBias(image_cube_array, sampler_reg, tc3_, 0i, 2f);
let _e141 = a;
a = (_e141 + _e140);
let _e143 = a;
return _e143;
}
@fragment

View File

@ -53,71 +53,71 @@ fn testTex1D(coord: f32) {
let _e17 = textureSampleGrad(tex1D, samp, _e14, 4f, 4f);
c = _e17;
let _e18 = coord_1;
let _e21 = textureSampleGrad(tex1D, samp, _e18, 4f, 4f, 5i);
c = _e21;
let _e22 = coord_1;
let _e24 = textureSampleLevel(tex1D, samp, _e22, 3f);
c = _e24;
let _e25 = coord_1;
let _e27 = textureSampleLevel(tex1D, samp, _e25, 3f, 5i);
c = _e27;
let _e28 = coord_1;
let _e29 = textureSample(tex1D, samp, _e28, 5i);
let _e22 = textureSampleGrad(tex1D, samp, _e18, 4f, 4f, 5i);
c = _e22;
let _e23 = coord_1;
let _e25 = textureSampleLevel(tex1D, samp, _e23, 3f);
c = _e25;
let _e26 = coord_1;
let _e29 = textureSampleLevel(tex1D, samp, _e26, 3f, 5i);
c = _e29;
let _e30 = coord_1;
let _e32 = vec2<f32>(_e30, 6f);
let _e36 = textureSample(tex1D, samp, (_e32.x / _e32.y));
c = _e36;
let _e37 = coord_1;
let _e41 = vec4<f32>(_e37, 0f, 0f, 6f);
let _e47 = textureSample(tex1D, samp, (_e41.xyz / vec3(_e41.w)).x);
c = _e47;
let _e48 = coord_1;
let _e50 = vec2<f32>(_e48, 6f);
let _e56 = textureSampleGrad(tex1D, samp, (_e50.x / _e50.y), 4f, 4f);
c = _e56;
let _e57 = coord_1;
let _e61 = vec4<f32>(_e57, 0f, 0f, 6f);
let _e69 = textureSampleGrad(tex1D, samp, (_e61.xyz / vec3(_e61.w)).x, 4f, 4f);
c = _e69;
let _e70 = coord_1;
let _e72 = vec2<f32>(_e70, 6f);
let _e78 = textureSampleGrad(tex1D, samp, (_e72.x / _e72.y), 4f, 4f, 5i);
c = _e78;
let _e79 = coord_1;
let _e83 = vec4<f32>(_e79, 0f, 0f, 6f);
let _e91 = textureSampleGrad(tex1D, samp, (_e83.xyz / vec3(_e83.w)).x, 4f, 4f, 5i);
c = _e91;
let _e92 = coord_1;
let _e94 = vec2<f32>(_e92, 6f);
let _e99 = textureSampleLevel(tex1D, samp, (_e94.x / _e94.y), 3f);
c = _e99;
let _e100 = coord_1;
let _e104 = vec4<f32>(_e100, 0f, 0f, 6f);
let _e111 = textureSampleLevel(tex1D, samp, (_e104.xyz / vec3(_e104.w)).x, 3f);
c = _e111;
let _e112 = coord_1;
let _e114 = vec2<f32>(_e112, 6f);
let _e119 = textureSampleLevel(tex1D, samp, (_e114.x / _e114.y), 3f, 5i);
c = _e119;
let _e120 = coord_1;
let _e124 = vec4<f32>(_e120, 0f, 0f, 6f);
let _e131 = textureSampleLevel(tex1D, samp, (_e124.xyz / vec3(_e124.w)).x, 3f, 5i);
c = _e131;
let _e132 = coord_1;
let _e134 = vec2<f32>(_e132, 6f);
let _e138 = textureSample(tex1D, samp, (_e134.x / _e134.y), 5i);
let _e32 = textureSample(tex1D, samp, _e30, 5i);
c = _e32;
let _e33 = coord_1;
let _e35 = vec2<f32>(_e33, 6f);
let _e39 = textureSample(tex1D, samp, (_e35.x / _e35.y));
c = _e39;
let _e40 = coord_1;
let _e44 = vec4<f32>(_e40, 0f, 0f, 6f);
let _e50 = textureSample(tex1D, samp, (_e44.xyz / vec3(_e44.w)).x);
c = _e50;
let _e51 = coord_1;
let _e53 = vec2<f32>(_e51, 6f);
let _e59 = textureSampleGrad(tex1D, samp, (_e53.x / _e53.y), 4f, 4f);
c = _e59;
let _e60 = coord_1;
let _e64 = vec4<f32>(_e60, 0f, 0f, 6f);
let _e72 = textureSampleGrad(tex1D, samp, (_e64.xyz / vec3(_e64.w)).x, 4f, 4f);
c = _e72;
let _e73 = coord_1;
let _e75 = vec2<f32>(_e73, 6f);
let _e82 = textureSampleGrad(tex1D, samp, (_e75.x / _e75.y), 4f, 4f, 5i);
c = _e82;
let _e83 = coord_1;
let _e87 = vec4<f32>(_e83, 0f, 0f, 6f);
let _e96 = textureSampleGrad(tex1D, samp, (_e87.xyz / vec3(_e87.w)).x, 4f, 4f, 5i);
c = _e96;
let _e97 = coord_1;
let _e99 = vec2<f32>(_e97, 6f);
let _e104 = textureSampleLevel(tex1D, samp, (_e99.x / _e99.y), 3f);
c = _e104;
let _e105 = coord_1;
let _e109 = vec4<f32>(_e105, 0f, 0f, 6f);
let _e116 = textureSampleLevel(tex1D, samp, (_e109.xyz / vec3(_e109.w)).x, 3f);
c = _e116;
let _e117 = coord_1;
let _e119 = vec2<f32>(_e117, 6f);
let _e125 = textureSampleLevel(tex1D, samp, (_e119.x / _e119.y), 3f, 5i);
c = _e125;
let _e126 = coord_1;
let _e130 = vec4<f32>(_e126, 0f, 0f, 6f);
let _e138 = textureSampleLevel(tex1D, samp, (_e130.xyz / vec3(_e130.w)).x, 3f, 5i);
c = _e138;
let _e139 = coord_1;
let _e143 = vec4<f32>(_e139, 0f, 0f, 6f);
let _e149 = textureSample(tex1D, samp, (_e143.xyz / vec3(_e143.w)).x, 5i);
c = _e149;
let _e150 = coord_1;
let _e153 = textureLoad(tex1D, i32(_e150), 3i);
c = _e153;
let _e154 = coord_1;
let _e157 = textureLoad(tex1D, i32(_e154), 3i);
c = _e157;
let _e141 = vec2<f32>(_e139, 6f);
let _e146 = textureSample(tex1D, samp, (_e141.x / _e141.y), 5i);
c = _e146;
let _e147 = coord_1;
let _e151 = vec4<f32>(_e147, 0f, 0f, 6f);
let _e158 = textureSample(tex1D, samp, (_e151.xyz / vec3(_e151.w)).x, 5i);
c = _e158;
let _e159 = coord_1;
let _e162 = textureLoad(tex1D, i32(_e159), 3i);
c = _e162;
let _e163 = coord_1;
let _e166 = textureLoad(tex1D, i32(_e163), 3i);
c = _e166;
return;
}
@ -140,25 +140,25 @@ fn testTex1DArray(coord_2: vec2<f32>) {
let _e25 = textureSampleGrad(tex1DArray, samp, _e19.x, i32(_e19.y), 4f, 4f);
c_1 = _e25;
let _e26 = coord_3;
let _e32 = textureSampleGrad(tex1DArray, samp, _e26.x, i32(_e26.y), 4f, 4f, 5i);
c_1 = _e32;
let _e33 = coord_3;
let _e38 = textureSampleLevel(tex1DArray, samp, _e33.x, i32(_e33.y), 3f);
c_1 = _e38;
let _e39 = coord_3;
let _e44 = textureSampleLevel(tex1DArray, samp, _e39.x, i32(_e39.y), 3f, 5i);
c_1 = _e44;
let _e45 = coord_3;
let _e49 = textureSample(tex1DArray, samp, _e45.x, i32(_e45.y), 5i);
c_1 = _e49;
let _e50 = coord_3;
let _e51 = vec2<i32>(_e50);
let _e55 = textureLoad(tex1DArray, _e51.x, _e51.y, 3i);
c_1 = _e55;
let _e56 = coord_3;
let _e57 = vec2<i32>(_e56);
let _e61 = textureLoad(tex1DArray, _e57.x, _e57.y, 3i);
c_1 = _e61;
let _e33 = textureSampleGrad(tex1DArray, samp, _e26.x, i32(_e26.y), 4f, 4f, 5i);
c_1 = _e33;
let _e34 = coord_3;
let _e39 = textureSampleLevel(tex1DArray, samp, _e34.x, i32(_e34.y), 3f);
c_1 = _e39;
let _e40 = coord_3;
let _e46 = textureSampleLevel(tex1DArray, samp, _e40.x, i32(_e40.y), 3f, 5i);
c_1 = _e46;
let _e47 = coord_3;
let _e52 = textureSample(tex1DArray, samp, _e47.x, i32(_e47.y), 5i);
c_1 = _e52;
let _e53 = coord_3;
let _e54 = vec2<i32>(_e53);
let _e58 = textureLoad(tex1DArray, _e54.x, _e54.y, 3i);
c_1 = _e58;
let _e59 = coord_3;
let _e60 = vec2<i32>(_e59);
let _e64 = textureLoad(tex1DArray, _e60.x, _e60.y, 3i);
c_1 = _e64;
return;
}
@ -183,102 +183,102 @@ fn testTex2D(coord_4: vec2<f32>) {
let _e24 = textureSampleGrad(tex2D, samp, _e19, vec2(4f), vec2(4f));
c_2 = _e24;
let _e25 = coord_5;
let _e30 = textureSampleGrad(tex2D, samp, _e25, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e30;
let _e31 = coord_5;
let _e33 = textureSampleLevel(tex2D, samp, _e31, 3f);
c_2 = _e33;
let _e34 = coord_5;
let _e36 = textureSampleLevel(tex2D, samp, _e34, 3f, vec2(5i));
c_2 = _e36;
let _e37 = coord_5;
let _e38 = textureSample(tex2D, samp, _e37, vec2(5i));
c_2 = _e38;
let _e39 = coord_5;
let _e41 = textureSampleBias(tex2D, samp, _e39, 2f, vec2(5i));
c_2 = _e41;
let _e42 = coord_5;
let _e46 = vec3<f32>(_e42.x, _e42.y, 6f);
let _e51 = textureSample(tex2D, samp, (_e46.xy / vec2(_e46.z)));
c_2 = _e51;
let _e52 = coord_5;
let _e57 = vec4<f32>(_e52.x, _e52.y, 0f, 6f);
let _e63 = textureSample(tex2D, samp, (_e57.xyz / vec3(_e57.w)).xy);
c_2 = _e63;
let _e64 = coord_5;
let _e68 = vec3<f32>(_e64.x, _e64.y, 6f);
let _e74 = textureSampleBias(tex2D, samp, (_e68.xy / vec2(_e68.z)), 2f);
c_2 = _e74;
let _e75 = coord_5;
let _e80 = vec4<f32>(_e75.x, _e75.y, 0f, 6f);
let _e87 = textureSampleBias(tex2D, samp, (_e80.xyz / vec3(_e80.w)).xy, 2f);
c_2 = _e87;
let _e88 = coord_5;
let _e92 = vec3<f32>(_e88.x, _e88.y, 6f);
let _e101 = textureSampleGrad(tex2D, samp, (_e92.xy / vec2(_e92.z)), vec2(4f), vec2(4f));
c_2 = _e101;
let _e102 = coord_5;
let _e107 = vec4<f32>(_e102.x, _e102.y, 0f, 6f);
let _e117 = textureSampleGrad(tex2D, samp, (_e107.xyz / vec3(_e107.w)).xy, vec2(4f), vec2(4f));
c_2 = _e117;
let _e118 = coord_5;
let _e122 = vec3<f32>(_e118.x, _e118.y, 6f);
let _e131 = textureSampleGrad(tex2D, samp, (_e122.xy / vec2(_e122.z)), vec2(4f), vec2(4f), vec2(5i));
c_2 = _e131;
let _e132 = coord_5;
let _e137 = vec4<f32>(_e132.x, _e132.y, 0f, 6f);
let _e147 = textureSampleGrad(tex2D, samp, (_e137.xyz / vec3(_e137.w)).xy, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e147;
let _e148 = coord_5;
let _e152 = vec3<f32>(_e148.x, _e148.y, 6f);
let _e158 = textureSampleLevel(tex2D, samp, (_e152.xy / vec2(_e152.z)), 3f);
c_2 = _e158;
let _e159 = coord_5;
let _e164 = vec4<f32>(_e159.x, _e159.y, 0f, 6f);
let _e171 = textureSampleLevel(tex2D, samp, (_e164.xyz / vec3(_e164.w)).xy, 3f);
c_2 = _e171;
let _e172 = coord_5;
let _e176 = vec3<f32>(_e172.x, _e172.y, 6f);
let _e182 = textureSampleLevel(tex2D, samp, (_e176.xy / vec2(_e176.z)), 3f, vec2(5i));
c_2 = _e182;
let _e183 = coord_5;
let _e188 = vec4<f32>(_e183.x, _e183.y, 0f, 6f);
let _e195 = textureSampleLevel(tex2D, samp, (_e188.xyz / vec3(_e188.w)).xy, 3f, vec2(5i));
c_2 = _e195;
let _e196 = coord_5;
let _e200 = vec3<f32>(_e196.x, _e196.y, 6f);
let _e205 = textureSample(tex2D, samp, (_e200.xy / vec2(_e200.z)), vec2(5i));
c_2 = _e205;
let _e206 = coord_5;
let _e211 = vec4<f32>(_e206.x, _e206.y, 0f, 6f);
let _e217 = textureSample(tex2D, samp, (_e211.xyz / vec3(_e211.w)).xy, vec2(5i));
c_2 = _e217;
let _e218 = coord_5;
let _e222 = vec3<f32>(_e218.x, _e218.y, 6f);
let _e228 = textureSampleBias(tex2D, samp, (_e222.xy / vec2(_e222.z)), 2f, vec2(5i));
c_2 = _e228;
let _e229 = coord_5;
let _e234 = vec4<f32>(_e229.x, _e229.y, 0f, 6f);
let _e241 = textureSampleBias(tex2D, samp, (_e234.xyz / vec3(_e234.w)).xy, 2f, vec2(5i));
c_2 = _e241;
let _e242 = coord_5;
let _e245 = textureLoad(tex2D, vec2<i32>(_e242), 3i);
c_2 = _e245;
let _e246 = coord_5;
let _e249 = textureLoad(utex2D, vec2<i32>(_e246), 3i);
c_2 = vec4<f32>(_e249);
let _e32 = textureSampleGrad(tex2D, samp, _e25, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e32;
let _e33 = coord_5;
let _e35 = textureSampleLevel(tex2D, samp, _e33, 3f);
c_2 = _e35;
let _e36 = coord_5;
let _e40 = textureSampleLevel(tex2D, samp, _e36, 3f, vec2(5i));
c_2 = _e40;
let _e41 = coord_5;
let _e44 = textureSample(tex2D, samp, _e41, vec2(5i));
c_2 = _e44;
let _e45 = coord_5;
let _e49 = textureSampleBias(tex2D, samp, _e45, 2f, vec2(5i));
c_2 = _e49;
let _e50 = coord_5;
let _e54 = vec3<f32>(_e50.x, _e50.y, 6f);
let _e59 = textureSample(tex2D, samp, (_e54.xy / vec2(_e54.z)));
c_2 = _e59;
let _e60 = coord_5;
let _e65 = vec4<f32>(_e60.x, _e60.y, 0f, 6f);
let _e71 = textureSample(tex2D, samp, (_e65.xyz / vec3(_e65.w)).xy);
c_2 = _e71;
let _e72 = coord_5;
let _e76 = vec3<f32>(_e72.x, _e72.y, 6f);
let _e82 = textureSampleBias(tex2D, samp, (_e76.xy / vec2(_e76.z)), 2f);
c_2 = _e82;
let _e83 = coord_5;
let _e88 = vec4<f32>(_e83.x, _e83.y, 0f, 6f);
let _e95 = textureSampleBias(tex2D, samp, (_e88.xyz / vec3(_e88.w)).xy, 2f);
c_2 = _e95;
let _e96 = coord_5;
let _e100 = vec3<f32>(_e96.x, _e96.y, 6f);
let _e109 = textureSampleGrad(tex2D, samp, (_e100.xy / vec2(_e100.z)), vec2(4f), vec2(4f));
c_2 = _e109;
let _e110 = coord_5;
let _e115 = vec4<f32>(_e110.x, _e110.y, 0f, 6f);
let _e125 = textureSampleGrad(tex2D, samp, (_e115.xyz / vec3(_e115.w)).xy, vec2(4f), vec2(4f));
c_2 = _e125;
let _e126 = coord_5;
let _e130 = vec3<f32>(_e126.x, _e126.y, 6f);
let _e141 = textureSampleGrad(tex2D, samp, (_e130.xy / vec2(_e130.z)), vec2(4f), vec2(4f), vec2(5i));
c_2 = _e141;
let _e142 = coord_5;
let _e147 = vec4<f32>(_e142.x, _e142.y, 0f, 6f);
let _e159 = textureSampleGrad(tex2D, samp, (_e147.xyz / vec3(_e147.w)).xy, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e159;
let _e160 = coord_5;
let _e164 = vec3<f32>(_e160.x, _e160.y, 6f);
let _e170 = textureSampleLevel(tex2D, samp, (_e164.xy / vec2(_e164.z)), 3f);
c_2 = _e170;
let _e171 = coord_5;
let _e176 = vec4<f32>(_e171.x, _e171.y, 0f, 6f);
let _e183 = textureSampleLevel(tex2D, samp, (_e176.xyz / vec3(_e176.w)).xy, 3f);
c_2 = _e183;
let _e184 = coord_5;
let _e188 = vec3<f32>(_e184.x, _e184.y, 6f);
let _e196 = textureSampleLevel(tex2D, samp, (_e188.xy / vec2(_e188.z)), 3f, vec2(5i));
c_2 = _e196;
let _e197 = coord_5;
let _e202 = vec4<f32>(_e197.x, _e197.y, 0f, 6f);
let _e211 = textureSampleLevel(tex2D, samp, (_e202.xyz / vec3(_e202.w)).xy, 3f, vec2(5i));
c_2 = _e211;
let _e212 = coord_5;
let _e216 = vec3<f32>(_e212.x, _e212.y, 6f);
let _e223 = textureSample(tex2D, samp, (_e216.xy / vec2(_e216.z)), vec2(5i));
c_2 = _e223;
let _e224 = coord_5;
let _e229 = vec4<f32>(_e224.x, _e224.y, 0f, 6f);
let _e237 = textureSample(tex2D, samp, (_e229.xyz / vec3(_e229.w)).xy, vec2(5i));
c_2 = _e237;
let _e238 = coord_5;
let _e242 = vec3<f32>(_e238.x, _e238.y, 6f);
let _e250 = textureSampleBias(tex2D, samp, (_e242.xy / vec2(_e242.z)), 2f, vec2(5i));
c_2 = _e250;
let _e251 = coord_5;
let _e254 = textureLoad(itex2D, vec2<i32>(_e251), 3i);
c_2 = vec4<f32>(_e254);
let _e256 = coord_5;
let _e259 = textureLoad(tex2D, vec2<i32>(_e256), 3i);
c_2 = _e259;
let _e260 = coord_5;
let _e263 = textureLoad(utex2D, vec2<i32>(_e260), 3i);
c_2 = vec4<f32>(_e263);
let _e265 = coord_5;
let _e268 = textureLoad(itex2D, vec2<i32>(_e265), 3i);
c_2 = vec4<f32>(_e268);
let _e256 = vec4<f32>(_e251.x, _e251.y, 0f, 6f);
let _e265 = textureSampleBias(tex2D, samp, (_e256.xyz / vec3(_e256.w)).xy, 2f, vec2(5i));
c_2 = _e265;
let _e266 = coord_5;
let _e269 = textureLoad(tex2D, vec2<i32>(_e266), 3i);
c_2 = _e269;
let _e270 = coord_5;
let _e273 = textureLoad(utex2D, vec2<i32>(_e270), 3i);
c_2 = vec4<f32>(_e273);
let _e275 = coord_5;
let _e278 = textureLoad(itex2D, vec2<i32>(_e275), 3i);
c_2 = vec4<f32>(_e278);
let _e280 = coord_5;
let _e283 = textureLoad(tex2D, vec2<i32>(_e280), 3i);
c_2 = _e283;
let _e284 = coord_5;
let _e287 = textureLoad(utex2D, vec2<i32>(_e284), 3i);
c_2 = vec4<f32>(_e287);
let _e289 = coord_5;
let _e292 = textureLoad(itex2D, vec2<i32>(_e289), 3i);
c_2 = vec4<f32>(_e292);
return;
}
@ -303,50 +303,50 @@ fn testTex2DShadow(coord_6: vec2<f32>) {
d = _e27;
let _e28 = coord_7;
let _e32 = vec3<f32>(_e28.x, _e28.y, 1f);
let _e35 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e32.xy, _e32.z, vec2(5i));
d = _e35;
let _e36 = coord_7;
let _e40 = vec3<f32>(_e36.x, _e36.y, 1f);
let _e43 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e40.xy, _e40.z);
d = _e43;
let _e44 = coord_7;
let _e48 = vec3<f32>(_e44.x, _e44.y, 1f);
let _e51 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e48.xy, _e48.z, vec2(5i));
d = _e51;
let _e52 = coord_7;
let _e56 = vec3<f32>(_e52.x, _e52.y, 1f);
let _e59 = textureSampleCompare(tex2DShadow, sampShadow, _e56.xy, _e56.z, vec2(5i));
d = _e59;
let _e60 = coord_7;
let _e65 = vec4<f32>(_e60.x, _e60.y, 1f, 6f);
let _e69 = (_e65.xyz / vec3(_e65.w));
let _e72 = textureSampleCompare(tex2DShadow, sampShadow, _e69.xy, _e69.z);
d = _e72;
let _e73 = coord_7;
let _e78 = vec4<f32>(_e73.x, _e73.y, 1f, 6f);
let _e82 = (_e78.xyz / vec3(_e78.w));
let _e85 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e82.xy, _e82.z);
d = _e85;
let _e86 = coord_7;
let _e91 = vec4<f32>(_e86.x, _e86.y, 1f, 6f);
let _e95 = (_e91.xyz / vec3(_e91.w));
let _e98 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e95.xy, _e95.z, vec2(5i));
d = _e98;
let _e99 = coord_7;
let _e104 = vec4<f32>(_e99.x, _e99.y, 1f, 6f);
let _e108 = (_e104.xyz / vec3(_e104.w));
let _e111 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e108.xy, _e108.z);
d = _e111;
let _e112 = coord_7;
let _e117 = vec4<f32>(_e112.x, _e112.y, 1f, 6f);
let _e121 = (_e117.xyz / vec3(_e117.w));
let _e124 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e121.xy, _e121.z, vec2(5i));
d = _e124;
let _e125 = coord_7;
let _e130 = vec4<f32>(_e125.x, _e125.y, 1f, 6f);
let _e134 = (_e130.xyz / vec3(_e130.w));
let _e137 = textureSampleCompare(tex2DShadow, sampShadow, _e134.xy, _e134.z, vec2(5i));
d = _e137;
let _e37 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e32.xy, _e32.z, vec2(5i));
d = _e37;
let _e38 = coord_7;
let _e42 = vec3<f32>(_e38.x, _e38.y, 1f);
let _e45 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e42.xy, _e42.z);
d = _e45;
let _e46 = coord_7;
let _e50 = vec3<f32>(_e46.x, _e46.y, 1f);
let _e55 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e50.xy, _e50.z, vec2(5i));
d = _e55;
let _e56 = coord_7;
let _e60 = vec3<f32>(_e56.x, _e56.y, 1f);
let _e65 = textureSampleCompare(tex2DShadow, sampShadow, _e60.xy, _e60.z, vec2(5i));
d = _e65;
let _e66 = coord_7;
let _e71 = vec4<f32>(_e66.x, _e66.y, 1f, 6f);
let _e75 = (_e71.xyz / vec3(_e71.w));
let _e78 = textureSampleCompare(tex2DShadow, sampShadow, _e75.xy, _e75.z);
d = _e78;
let _e79 = coord_7;
let _e84 = vec4<f32>(_e79.x, _e79.y, 1f, 6f);
let _e88 = (_e84.xyz / vec3(_e84.w));
let _e91 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e88.xy, _e88.z);
d = _e91;
let _e92 = coord_7;
let _e97 = vec4<f32>(_e92.x, _e92.y, 1f, 6f);
let _e103 = (_e97.xyz / vec3(_e97.w));
let _e106 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e103.xy, _e103.z, vec2(5i));
d = _e106;
let _e107 = coord_7;
let _e112 = vec4<f32>(_e107.x, _e107.y, 1f, 6f);
let _e116 = (_e112.xyz / vec3(_e112.w));
let _e119 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e116.xy, _e116.z);
d = _e119;
let _e120 = coord_7;
let _e125 = vec4<f32>(_e120.x, _e120.y, 1f, 6f);
let _e131 = (_e125.xyz / vec3(_e125.w));
let _e134 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e131.xy, _e131.z, vec2(5i));
d = _e134;
let _e135 = coord_7;
let _e140 = vec4<f32>(_e135.x, _e135.y, 1f, 6f);
let _e146 = (_e140.xyz / vec3(_e140.w));
let _e149 = textureSampleCompare(tex2DShadow, sampShadow, _e146.xy, _e146.z, vec2(5i));
d = _e149;
return;
}
@ -372,28 +372,28 @@ fn testTex2DArray(coord_8: vec3<f32>) {
let _e35 = textureSampleGrad(tex2DArray, samp, _e27.xy, i32(_e27.z), vec2(4f), vec2(4f));
c_3 = _e35;
let _e36 = coord_9;
let _e44 = textureSampleGrad(tex2DArray, samp, _e36.xy, i32(_e36.z), vec2(4f), vec2(4f), vec2(5i));
c_3 = _e44;
let _e45 = coord_9;
let _e50 = textureSampleLevel(tex2DArray, samp, _e45.xy, i32(_e45.z), 3f);
c_3 = _e50;
let _e51 = coord_9;
let _e56 = textureSampleLevel(tex2DArray, samp, _e51.xy, i32(_e51.z), 3f, vec2(5i));
c_3 = _e56;
let _e57 = coord_9;
let _e61 = textureSample(tex2DArray, samp, _e57.xy, i32(_e57.z), vec2(5i));
c_3 = _e61;
let _e62 = coord_9;
let _e67 = textureSampleBias(tex2DArray, samp, _e62.xy, i32(_e62.z), 2f, vec2(5i));
let _e46 = textureSampleGrad(tex2DArray, samp, _e36.xy, i32(_e36.z), vec2(4f), vec2(4f), vec2(5i));
c_3 = _e46;
let _e47 = coord_9;
let _e52 = textureSampleLevel(tex2DArray, samp, _e47.xy, i32(_e47.z), 3f);
c_3 = _e52;
let _e53 = coord_9;
let _e60 = textureSampleLevel(tex2DArray, samp, _e53.xy, i32(_e53.z), 3f, vec2(5i));
c_3 = _e60;
let _e61 = coord_9;
let _e67 = textureSample(tex2DArray, samp, _e61.xy, i32(_e61.z), vec2(5i));
c_3 = _e67;
let _e68 = coord_9;
let _e69 = vec3<i32>(_e68);
let _e73 = textureLoad(tex2DArray, _e69.xy, _e69.z, 3i);
c_3 = _e73;
let _e74 = coord_9;
let _e75 = vec3<i32>(_e74);
let _e79 = textureLoad(tex2DArray, _e75.xy, _e75.z, 3i);
c_3 = _e79;
let _e75 = textureSampleBias(tex2DArray, samp, _e68.xy, i32(_e68.z), 2f, vec2(5i));
c_3 = _e75;
let _e76 = coord_9;
let _e77 = vec3<i32>(_e76);
let _e81 = textureLoad(tex2DArray, _e77.xy, _e77.z, 3i);
c_3 = _e81;
let _e82 = coord_9;
let _e83 = vec3<i32>(_e82);
let _e87 = textureLoad(tex2DArray, _e83.xy, _e83.z, 3i);
c_3 = _e87;
return;
}
@ -419,12 +419,12 @@ fn testTex2DArrayShadow(coord_10: vec3<f32>) {
d_1 = _e37;
let _e38 = coord_11;
let _e43 = vec4<f32>(_e38.x, _e38.y, _e38.z, 1f);
let _e48 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e43.xy, i32(_e43.z), _e43.w, vec2(5i));
d_1 = _e48;
let _e49 = coord_11;
let _e54 = vec4<f32>(_e49.x, _e49.y, _e49.z, 1f);
let _e59 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e54.xy, i32(_e54.z), _e54.w, vec2(5i));
d_1 = _e59;
let _e50 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e43.xy, i32(_e43.z), _e43.w, vec2(5i));
d_1 = _e50;
let _e51 = coord_11;
let _e56 = vec4<f32>(_e51.x, _e51.y, _e51.z, 1f);
let _e63 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e56.xy, i32(_e56.z), _e56.w, vec2(5i));
d_1 = _e63;
return;
}
@ -548,52 +548,52 @@ fn testTex3D(coord_20: vec3<f32>) {
c_6 = _e39;
let _e40 = coord_21;
let _e45 = vec4<f32>(_e40.x, _e40.y, _e40.z, 6f);
let _e50 = textureSample(tex3D, samp, (_e45.xyz / vec3(_e45.w)), vec3(5i));
c_6 = _e50;
let _e51 = coord_21;
let _e56 = vec4<f32>(_e51.x, _e51.y, _e51.z, 6f);
let _e62 = textureSampleBias(tex3D, samp, (_e56.xyz / vec3(_e56.w)), 2f, vec3(5i));
c_6 = _e62;
let _e63 = coord_21;
let _e68 = vec4<f32>(_e63.x, _e63.y, _e63.z, 6f);
let _e74 = textureSampleLevel(tex3D, samp, (_e68.xyz / vec3(_e68.w)), 3f);
c_6 = _e74;
let _e75 = coord_21;
let _e80 = vec4<f32>(_e75.x, _e75.y, _e75.z, 6f);
let _e86 = textureSampleLevel(tex3D, samp, (_e80.xyz / vec3(_e80.w)), 3f, vec3(5i));
c_6 = _e86;
let _e87 = coord_21;
let _e92 = vec4<f32>(_e87.x, _e87.y, _e87.z, 6f);
let _e101 = textureSampleGrad(tex3D, samp, (_e92.xyz / vec3(_e92.w)), vec3(4f), vec3(4f));
c_6 = _e101;
let _e102 = coord_21;
let _e107 = vec4<f32>(_e102.x, _e102.y, _e102.z, 6f);
let _e116 = textureSampleGrad(tex3D, samp, (_e107.xyz / vec3(_e107.w)), vec3(4f), vec3(4f), vec3(5i));
c_6 = _e116;
let _e117 = coord_21;
let _e122 = textureSampleGrad(tex3D, samp, _e117, vec3(4f), vec3(4f));
c_6 = _e122;
let _e123 = coord_21;
let _e128 = textureSampleGrad(tex3D, samp, _e123, vec3(4f), vec3(4f), vec3(5i));
c_6 = _e128;
let _e129 = coord_21;
let _e131 = textureSampleLevel(tex3D, samp, _e129, 3f);
c_6 = _e131;
let _e132 = coord_21;
let _e134 = textureSampleLevel(tex3D, samp, _e132, 3f, vec3(5i));
c_6 = _e134;
let _e135 = coord_21;
let _e136 = textureSample(tex3D, samp, _e135, vec3(5i));
c_6 = _e136;
let _e137 = coord_21;
let _e139 = textureSampleBias(tex3D, samp, _e137, 2f, vec3(5i));
c_6 = _e139;
let _e140 = coord_21;
let _e143 = textureLoad(tex3D, vec3<i32>(_e140), 3i);
c_6 = _e143;
let _e144 = coord_21;
let _e147 = textureLoad(tex3D, vec3<i32>(_e144), 3i);
c_6 = _e147;
let _e52 = textureSample(tex3D, samp, (_e45.xyz / vec3(_e45.w)), vec3(5i));
c_6 = _e52;
let _e53 = coord_21;
let _e58 = vec4<f32>(_e53.x, _e53.y, _e53.z, 6f);
let _e66 = textureSampleBias(tex3D, samp, (_e58.xyz / vec3(_e58.w)), 2f, vec3(5i));
c_6 = _e66;
let _e67 = coord_21;
let _e72 = vec4<f32>(_e67.x, _e67.y, _e67.z, 6f);
let _e78 = textureSampleLevel(tex3D, samp, (_e72.xyz / vec3(_e72.w)), 3f);
c_6 = _e78;
let _e79 = coord_21;
let _e84 = vec4<f32>(_e79.x, _e79.y, _e79.z, 6f);
let _e92 = textureSampleLevel(tex3D, samp, (_e84.xyz / vec3(_e84.w)), 3f, vec3(5i));
c_6 = _e92;
let _e93 = coord_21;
let _e98 = vec4<f32>(_e93.x, _e93.y, _e93.z, 6f);
let _e107 = textureSampleGrad(tex3D, samp, (_e98.xyz / vec3(_e98.w)), vec3(4f), vec3(4f));
c_6 = _e107;
let _e108 = coord_21;
let _e113 = vec4<f32>(_e108.x, _e108.y, _e108.z, 6f);
let _e124 = textureSampleGrad(tex3D, samp, (_e113.xyz / vec3(_e113.w)), vec3(4f), vec3(4f), vec3(5i));
c_6 = _e124;
let _e125 = coord_21;
let _e130 = textureSampleGrad(tex3D, samp, _e125, vec3(4f), vec3(4f));
c_6 = _e130;
let _e131 = coord_21;
let _e138 = textureSampleGrad(tex3D, samp, _e131, vec3(4f), vec3(4f), vec3(5i));
c_6 = _e138;
let _e139 = coord_21;
let _e141 = textureSampleLevel(tex3D, samp, _e139, 3f);
c_6 = _e141;
let _e142 = coord_21;
let _e146 = textureSampleLevel(tex3D, samp, _e142, 3f, vec3(5i));
c_6 = _e146;
let _e147 = coord_21;
let _e150 = textureSample(tex3D, samp, _e147, vec3(5i));
c_6 = _e150;
let _e151 = coord_21;
let _e155 = textureSampleBias(tex3D, samp, _e151, 2f, vec3(5i));
c_6 = _e155;
let _e156 = coord_21;
let _e159 = textureLoad(tex3D, vec3<i32>(_e156), 3i);
c_6 = _e159;
let _e160 = coord_21;
let _e163 = textureLoad(tex3D, vec3<i32>(_e160), 3i);
c_6 = _e163;
return;
}