[Mesa-dev] [PATCH 0/4] gallium, nv50, nvc0: add ARB_sample_shading
Ilia Mirkin
imirkin at alum.mit.edu
Thu Apr 24 17:28:29 PDT 2014
Thanks. Roland, mind taking a look, IIRC you're the one who had the
most objections last time around.
On Thu, Apr 24, 2014 at 5:44 PM, Marek Olšák <maraeo at gmail.com> wrote:
> Patch 1 & 2:
>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>
> Marek
>
> On Thu, Apr 24, 2014 at 3:56 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> This is my latest iteration of the ARB_sample_shading implementation. The only
>> known defect is that gl_SampleMask doesn't appear to work on nv50 nor
>> nvc0. I'm fairly sure it's due to some bit of setup I'm missing, but it has
>> thus far eluded me. I believe I've addressed the various earlier review
>> comments either with replies or by adjusting my code. Let me know if I've
>> missed anything.
>>
>> I reinstated the cso_cache thing, I think it's needed since blits/etc probably
>> should use min_samples == 1. I've used it in all the places I could find saved
>> the sample mask.
>>
>> Both nv50 and nvc0 need to stick the sample positions into a constbuf. Perhaps
>> it would make sense to make that manipulation more generic, but if there's HW
>> that will pull the sample position of the current sample, then maybe not.
>>
>> I've left all these things as system values because (a) they're system values
>> in mesa, and (b) it seems like a lot of trouble to expose the raster object as
>> an addressable item in TGSI for seemingly little benefit. A lowering pass in
>> the driver can just have it do the right thing.
>>
>> Assuming that the generic bits get positive reviews, I'd like to push the
>> nv50/nvc0 bits as well despite the gl_SampleMask failure. That'll get resolved
>> in time, and I doubt there are too many users of that feature. (Admittedly,
>> probably not too many users of ARB_sample_shading in general.)
>>
>> [ Another little short-coming for nv50/nvc0 is that there is no shader variant
>> support, and the code is different for per-sample vs per-fragment due to the
>> interpolation instructions. There are a few other things that need variant
>> support to work, perhaps that'll be done at a later time. ]
>>
>> Ilia Mirkin (4):
>> gallium: add basic support for ARB_sample_shading
>> mesa/st: add support for ARB_sample_shading
>> nv50: add support for PIPE_CAP_SAMPLE_SHADING
>> nvc0: add support for PIPE_CAP_SAMPLE_SHADING
>>
>> src/gallium/auxiliary/cso_cache/cso_context.c | 19 ++++++++++++
>> src/gallium/auxiliary/cso_cache/cso_context.h | 4 +++
>> src/gallium/auxiliary/hud/hud_context.c | 3 ++
>> src/gallium/auxiliary/postprocess/pp_run.c | 3 ++
>> src/gallium/auxiliary/tgsi/tgsi_strings.c | 5 ++-
>> src/gallium/auxiliary/util/u_blit.c | 3 ++
>> src/gallium/docs/source/context.rst | 3 ++
>> src/gallium/docs/source/screen.rst | 3 ++
>> src/gallium/docs/source/tgsi.rst | 20 ++++++++++++
>> src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
>> src/gallium/drivers/i915/i915_screen.c | 1 +
>> src/gallium/drivers/ilo/ilo_screen.c | 1 +
>> src/gallium/drivers/llvmpipe/lp_screen.c | 1 +
>> src/gallium/drivers/nouveau/codegen/nv50_ir.h | 8 +++++
>> .../drivers/nouveau/codegen/nv50_ir_driver.h | 3 +-
>> .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 13 ++++++++
>> .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 14 +++++++++
>> .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 10 +++++-
>> .../nouveau/codegen/nv50_ir_lowering_nv50.cpp | 12 ++++++++
>> .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 21 +++++++++++++
>> .../drivers/nouveau/codegen/nv50_ir_print.cpp | 2 ++
>> .../drivers/nouveau/codegen/nv50_ir_target.cpp | 6 ++--
>> .../nouveau/codegen/nv50_ir_target_nv50.cpp | 2 ++
>> .../nouveau/codegen/nv50_ir_target_nvc0.cpp | 2 ++
>> src/gallium/drivers/nouveau/nv30/nv30_screen.c | 1 +
>> src/gallium/drivers/nouveau/nv50/nv50_context.h | 7 ++++-
>> src/gallium/drivers/nouveau/nv50/nv50_program.c | 6 +++-
>> src/gallium/drivers/nouveau/nv50/nv50_program.h | 2 ++
>> src/gallium/drivers/nouveau/nv50/nv50_screen.c | 1 +
>> .../drivers/nouveau/nv50/nv50_shader_state.c | 13 ++++++++
>> src/gallium/drivers/nouveau/nv50/nv50_state.c | 12 ++++++++
>> .../drivers/nouveau/nv50/nv50_state_validate.c | 36 ++++++++++++++++++++--
>> src/gallium/drivers/nouveau/nv50/nv50_surface.c | 11 ++++++-
>> src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 2 ++
>> src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 17 +++++++---
>> src/gallium/drivers/nouveau/nvc0/nvc0_program.h | 1 +
>> src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 +
>> .../drivers/nouveau/nvc0/nvc0_shader_state.c | 2 ++
>> src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 12 ++++++++
>> .../drivers/nouveau/nvc0/nvc0_state_validate.c | 34 +++++++++++++++++---
>> src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 11 ++++++-
>> src/gallium/drivers/r300/r300_screen.c | 1 +
>> src/gallium/drivers/r600/r600_pipe.c | 1 +
>> src/gallium/drivers/radeonsi/si_pipe.c | 1 +
>> src/gallium/drivers/softpipe/sp_screen.c | 1 +
>> src/gallium/drivers/svga/svga_screen.c | 1 +
>> src/gallium/include/pipe/p_context.h | 3 ++
>> src/gallium/include/pipe/p_defines.h | 1 +
>> src/gallium/include/pipe/p_shader_tokens.h | 5 ++-
>> src/mesa/state_tracker/st_atom.c | 1 +
>> src/mesa/state_tracker/st_atom.h | 1 +
>> src/mesa/state_tracker/st_atom_msaa.c | 23 ++++++++++++++
>> src/mesa/state_tracker/st_cb_clear.c | 3 ++
>> src/mesa/state_tracker/st_extensions.c | 3 +-
>> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 16 ++++++++--
>> src/mesa/state_tracker/st_program.c | 21 ++++++++-----
>> 56 files changed, 378 insertions(+), 33 deletions(-)
>>
>> --
>> 1.8.3.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list