anv/meta_resolve: Set origin_upper_left on gl_FragCoord
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Feb 2016 20:44:39 +0000 (12:44 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Feb 2016 20:45:03 +0000 (12:45 -0800)
It's required by the spec and any shaders that don't set it will be broken.
I'm not really sure how multisampling was even working before...

src/vulkan/anv_meta_resolve.c

index 5aa2fef76bd188f52c14b25232d560a25983f51f..ae53292bde8ca88e95f6123bcb507d8746101c5a 100644 (file)
@@ -134,6 +134,7 @@ build_nir_fs(uint32_t num_samples)
    v_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,
                                      "v_position");
    v_position->data.location = VARYING_SLOT_POS;
+   v_position->data.origin_upper_left = true;
 
    v_tex_position = nir_variable_create(b.shader, nir_var_shader_in, vec4,
                                     "v_tex_position");