glsl/nir: add pixel_center_integer to shader info
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user