dEQP-GLES31.functional.layout_binding.image.image2d.vertex_binding_max_array,Fail
dEQP-GLES31.functional.layout_binding.image.image3d.vertex_binding_max_array,Fail
-dEQP-GLES31.functional.separate_shader.random.23,Fail
-dEQP-GLES31.functional.separate_shader.random.35,Fail
-dEQP-GLES31.functional.separate_shader.random.68,Fail
-dEQP-GLES31.functional.separate_shader.random.79,Fail
enum bi_vecsize vecsize = (instr->num_components + component - 1);
bi_index dest = (component == 0) ? bi_dest_index(&instr->dest) : bi_temp(b->shader);
+ unsigned sz = nir_dest_bit_size(instr->dest);
+
if (smooth) {
nir_intrinsic_instr *parent = nir_src_as_intrinsic(instr->src[0]);
assert(parent);
sample = bi_interp_for_intrinsic(parent->intrinsic);
src0 = bi_varying_src0_for_barycentric(b, parent);
- unsigned sz = nir_dest_bit_size(instr->dest);
assert(sz == 16 || sz == 32);
-
regfmt = (sz == 16) ? BI_REGISTER_FORMAT_F16
: BI_REGISTER_FORMAT_F32;
} else {
- regfmt = bi_reg_fmt_for_nir(nir_intrinsic_dest_type(instr));
+ assert(sz == 32);
+ regfmt = BI_REGISTER_FORMAT_U32;
}
nir_src *offset = nir_get_io_offset_src(instr);
static void
bi_emit_store_vary(bi_builder *b, nir_intrinsic_instr *instr)
{
- nir_alu_type T = nir_intrinsic_src_type(instr);
- enum bi_register_format regfmt = bi_reg_fmt_for_nir(T);
+ /* In principle we can do better for 16-bit. At the moment we require
+ * 32-bit to permit the use of .auto, in order to force .u32 for flat
+ * varyings, to handle internal TGSI shaders that set flat in the VS
+ * but smooth in the FS */
+
+ ASSERTED nir_alu_type T = nir_intrinsic_src_type(instr);
+ assert(nir_alu_type_get_type_size(T) == 32);
+ enum bi_register_format regfmt = BI_REGISTER_FORMAT_AUTO;
unsigned imm_index = 0;
bool immediate = bi_is_intr_immediate(instr, &imm_index, 16);
static void
collect_varyings(nir_shader *s, nir_variable_mode varying_mode,
struct pan_shader_varying *varyings,
- unsigned *varying_count)
+ unsigned *varying_count, bool is_bifrost)
{
*varying_count = 0;
unsigned chan = comps[loc];
nir_alu_type type = nir_get_nir_type_for_glsl_base_type(base_type);
-
type = nir_alu_type_get_base_type(type);
+ /* Can't do type conversion since GLSL IR packs in funny ways */
+ if (is_bifrost && var->data.interpolation == INTERP_MODE_FLAT)
+ type = nir_type_uint;
+
/* Demote to fp16 where possible. int16 varyings are TODO as the hw
* will saturate instead of wrap which is not conformant, so we need to
* insert i2i16/u2u16 instructions before the st_vary_32i/32u to get
info->vs.writes_point_size =
s->info.outputs_written & (1 << VARYING_SLOT_PSIZ);
collect_varyings(s, nir_var_shader_out, info->varyings.output,
- &info->varyings.output_count);
+ &info->varyings.output_count, pan_is_bifrost(dev));
break;
case MESA_SHADER_FRAGMENT:
if (s->info.outputs_written & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
info->fs.reads_helper_invocation =
BITSET_TEST(s->info.system_values_read, SYSTEM_VALUE_HELPER_INVOCATION);
collect_varyings(s, nir_var_shader_in, info->varyings.input,
- &info->varyings.input_count);
+ &info->varyings.input_count, pan_is_bifrost(dev));
break;
case MESA_SHADER_COMPUTE:
info->wls_size = s->info.shared_size;