diff --git a/.pick_status.json b/.pick_status.json index 1d1843d341a..dae6a46eb87 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -34,7 +34,7 @@ "description": "glsl: fix sampler and image type checking in lower_precision", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "733bee57eb80c92736f3ef1e1267e68ee6cfade6", "notes": null diff --git a/src/compiler/glsl/lower_precision.cpp b/src/compiler/glsl/lower_precision.cpp index e9b400ff29a..4129bbd1bd4 100644 --- a/src/compiler/glsl/lower_precision.cpp +++ b/src/compiler/glsl/lower_precision.cpp @@ -423,7 +423,7 @@ handle_call(ir_call *ir, const struct set *lowerable_rvalues) ir_variable *resource = param->variable_referenced(); assert(ir->callee->return_precision == GLSL_PRECISION_HIGH); - assert(glsl_type_is_image(glsl_without_array(resource->type))); + assert(glsl_type_is_image(param->type)); /* GLSL ES 3.20 requires that images have a precision modifier, but if * you set one, it doesn't do anything, because all intrinsics are @@ -466,7 +466,7 @@ handle_call(ir_call *ir, const struct set *lowerable_rvalues) * We should lower the type of the return value if the sampler type * uses lower precision. The function parameters don't matter. */ - if (var && glsl_type_is_sampler(glsl_without_array(var->type))) { + if (var && glsl_type_is_sampler(param->type)) { /* textureGatherOffsets always takes a highp array of constants. As * per the discussion https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547#note_1393704 * trying to lower the precision results in segfault later on