glsl/nir: add pixel_center_integer to shader info

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Timothy Arceri
2018-02-16 16:10:58 +11:00
parent fe76fc11b1
commit 347038baa9
2 changed files with 7 additions and 0 deletions

View File

@@ -406,6 +406,11 @@ nir_visitor::visit(ir_variable *ir)
var->data.pixel_center_integer = ir->data.pixel_center_integer;
var->data.location_frac = ir->data.location_frac;
if (var->data.pixel_center_integer) {
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
shader->info.fs.pixel_center_integer = true;
}
switch (ir->data.depth_layout) {
case ir_depth_layout_none:
var->data.depth_layout = nir_depth_layout_none;

View File

@@ -159,6 +159,8 @@ typedef struct shader_info {
bool post_depth_coverage;
bool pixel_center_integer;
/** gl_FragDepth layout for ARB_conservative_depth. */
enum gl_frag_depth_layout depth_layout;
} fs;