shader: return the corresponding type when translating TGSI_SEMANTIC_SAMPLEMASK

The SAMPLEMASK is always returning an integer, we previously always had another
instruction that would convert it to a float but this is no longer the case so
always convert it to a floating number.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/684>
macos/master
Corentin Noël 3 years ago
parent 8f7437f05c
commit a4844ef735
  1. 18
      .gitlab-ci/expectations/host/piglit-virgl-gl-fails.txt
  2. 14
      .gitlab-ci/expectations/host/piglit-virgl-gles-fails.txt
  3. 18
      .gitlab-ci/expectations/virt/piglit-virgl-gl-fails.txt
  4. 14
      .gitlab-ci/expectations/virt/piglit-virgl-gles-fails.txt
  5. 11
      src/vrend_shader.c

@ -131,24 +131,6 @@ spec@arb_point_sprite@arb_point_sprite-mipmap,Fail
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,Fail
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT,Fail
spec@arb_sample_shading@builtin-gl-sample-position 2,Fail
spec@arb_sample_shading@samplemask 2@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all,Fail
spec@arb_sample_shading@samplemask 2 all@sample partition,Fail
spec@arb_sample_shading@samplemask 2,Fail
spec@arb_sample_shading@samplemask 2@sample partition,Fail
spec@arb_sample_shading@samplemask 4@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all,Fail
spec@arb_sample_shading@samplemask 4 all@sample partition,Fail
spec@arb_sample_shading@samplemask 4,Fail
spec@arb_sample_shading@samplemask 4@sample partition,Fail
spec@arb_shader_image_load_store@early-z,Fail
spec@arb_shader_image_load_store@early-z@occlusion query test/early-z pass,Fail
spec@arb_shader_image_load_store@layer,Fail

@ -207,45 +207,31 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
spec@arb_provoking_vertex@arb-provoking-vertex-render,Fail
spec@arb_provoking_vertex@clipped-strip-first,Fail
spec@arb_sample_shading@samplemask 2@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all,Fail
spec@arb_sample_shading@samplemask 2 all@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@noms partition,Fail
spec@arb_sample_shading@samplemask 2 all@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@sample partition,Fail
spec@arb_sample_shading@samplemask 2,Fail
spec@arb_sample_shading@samplemask 2@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@noms partition,Fail
spec@arb_sample_shading@samplemask 2@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@sample partition,Fail
spec@arb_sample_shading@samplemask 4@0.250000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all,Fail
spec@arb_sample_shading@samplemask 4 all@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@noms partition,Fail
spec@arb_sample_shading@samplemask 4 all@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@sample partition,Fail
spec@arb_sample_shading@samplemask 4,Fail
spec@arb_sample_shading@samplemask 4@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@noms partition,Fail
spec@arb_sample_shading@samplemask 4@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@sample partition,Fail
spec@arb_seamless_cube_map@arb_seamless_cubemap,Fail
spec@arb_shader_atomic_counter_ops@execution@add,Fail
spec@arb_shader_atomic_counter_ops@execution@all_touch_test,Fail

@ -131,24 +131,6 @@ spec@arb_point_sprite@arb_point_sprite-mipmap,Fail
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,Fail
spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT,Fail
spec@arb_sample_shading@builtin-gl-sample-position 2,Fail
spec@arb_sample_shading@samplemask 2@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all,Fail
spec@arb_sample_shading@samplemask 2 all@sample partition,Fail
spec@arb_sample_shading@samplemask 2,Fail
spec@arb_sample_shading@samplemask 2@sample partition,Fail
spec@arb_sample_shading@samplemask 4@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all,Fail
spec@arb_sample_shading@samplemask 4 all@sample partition,Fail
spec@arb_sample_shading@samplemask 4,Fail
spec@arb_sample_shading@samplemask 4@sample partition,Fail
spec@arb_shader_image_load_store@early-z,Fail
spec@arb_shader_image_load_store@early-z@occlusion query test/early-z pass,Fail
spec@arb_shader_image_load_store@layer,Fail

@ -235,45 +235,31 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
spec@arb_provoking_vertex@arb-provoking-vertex-render,Fail
spec@arb_provoking_vertex@clipped-strip-first,Fail
spec@arb_sample_shading@samplemask 2@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 2 all,Fail
spec@arb_sample_shading@samplemask 2 all@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@noms partition,Fail
spec@arb_sample_shading@samplemask 2 all@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 2 all@sample partition,Fail
spec@arb_sample_shading@samplemask 2,Fail
spec@arb_sample_shading@samplemask 2@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@noms partition,Fail
spec@arb_sample_shading@samplemask 2@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 2@sample partition,Fail
spec@arb_sample_shading@samplemask 4@0.250000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@0.250000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@0.500000 partition,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@1.000000 partition,Fail
spec@arb_sample_shading@samplemask 4 all,Fail
spec@arb_sample_shading@samplemask 4 all@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@noms partition,Fail
spec@arb_sample_shading@samplemask 4 all@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 4 all@sample partition,Fail
spec@arb_sample_shading@samplemask 4,Fail
spec@arb_sample_shading@samplemask 4@noms mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@noms partition,Fail
spec@arb_sample_shading@samplemask 4@sample mask_in_one,Fail
spec@arb_sample_shading@samplemask 4@sample partition,Fail
spec@arb_seamless_cube_map@arb_seamless_cubemap,Fail
spec@arb_shader_atomic_counter_ops@execution@add,Fail
spec@arb_shader_atomic_counter_ops@execution@all_touch_test,Fail

@ -4532,12 +4532,15 @@ get_source_info(struct dump_ctx *ctx,
sinfo->override_no_cast[i] = true;
} else if (ctx->system_values[j].name == TGSI_SEMANTIC_SAMPLEMASK) {
const char *vec_type = "ivec4";
if (ctx->cfg->use_gles &&
(inst->Instruction.Opcode == TGSI_OPCODE_AND) &&
(stype == TGSI_TYPE_UNSIGNED))
enum vrend_type_qualifier srcstypeprefix = TYPE_CONVERSION_NONE;
if (stypeprefix == TYPE_CONVERSION_NONE)
srcstypeprefix = INT_BITS_TO_FLOAT;
else if (stype == TGSI_TYPE_UNSIGNED)
vec_type = "uvec4";
ctx->shader_req_bits |= SHADER_REQ_SAMPLE_SHADING | SHADER_REQ_INTS;
strbuf_fmt(src_buf, "%s(%s, %s, %s, %s)",
strbuf_fmt(src_buf, "%s(%s(%s, %s, %s, %s))",
get_string(srcstypeprefix),
vec_type,
src->Register.SwizzleX == TGSI_SWIZZLE_X ? ctx->system_values[j].glsl_name : "0",
src->Register.SwizzleY == TGSI_SWIZZLE_X ? ctx->system_values[j].glsl_name : "0",

Loading…
Cancel
Save