On Fri, Nov 6, 2015 at 6:39 PM, Rob Clark <robdcl...@gmail.com> wrote: > On Fri, Nov 6, 2015 at 6:23 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote: >> On Fri, Nov 6, 2015 at 8:35 AM, Rob Clark <robdcl...@gmail.com> wrote: >>> From: Rob Clark <robcl...@freedesktop.org> >>> >>> Signed-off-by: Rob Clark <robcl...@freedesktop.org> >>> --- >>> src/glsl/nir/nir_lower_clip.c | 2 ++ >>> src/glsl/nir/nir_lower_two_sided_color.c | 2 ++ >>> 2 files changed, 4 insertions(+) >>> >>> diff --git a/src/glsl/nir/nir_lower_clip.c b/src/glsl/nir/nir_lower_clip.c >>> index 31ccfb2..4a91527 100644 >>> --- a/src/glsl/nir/nir_lower_clip.c >>> +++ b/src/glsl/nir/nir_lower_clip.c >>> @@ -55,9 +55,11 @@ create_clipdist_var(nir_shader *shader, unsigned drvloc, >>> >>> if (output) { >>> exec_list_push_tail(&shader->outputs, &var->node); >>> + shader->num_outputs++; >>> } >>> else { >>> exec_list_push_tail(&shader->inputs, &var->node); >>> + shader->num_inputs++; >> >> I'm not sure what I think about this. Usually, num_inputs/outputs is >> set by nir_lower_io or similar. They don't have to be vec4's. In the >> i965 driver, FS inputs are in terms of floats. Maybe tgsi_to_nir >> provides you those guarantees but we haven't for i965. > > hmm, what do you recommend then? There isn't really any > straightforward way to run this *prior* to lower_io... tgsi->nir gives > me something that is already i/o lowered, and what I'm doing so far w/ > gallium support for glsl->nir is doing lower_io (and a few other > steps) in gallium so that the result the driver gets is equivalent to > tgsi->nir.. >
btw Jason, how do you feel about stuffing the type_size fxn ptr in nir_shader_compiler_options? It shouldn't ever change over the lifetime of the shader, we could drop it as arg to nir_assign_var_locations() (err, well, replace w/ nir_shader ptr), and we could use it to dtrt here.. BR, -R _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev