Hi,

this series is the second version of my patch set, which aims to improve the 
looks of Star Wars: Knights of the Old Republic (via Wine). The main feature is 
the implementation of GL_ATI_fragment_shader for all Gallium divers (though I 
could only test it with radeonsi, llvmpipe, and softpipe). If this extension is 
available, the game uses it quite extensively: perhaps the most notable effect 
is the animated water ripples, but it also fixes the grass, improves the 
specular on wet characters (e.g. the Selkath) and it is used for regular 
texturing almost everywhere. The game has two optional post-process effects 
that also depend on this extension: framebuffer effects (light bloom, 
distortion), and soft shadows.

See the screenshot gallery in 
http://lists.freedesktop.org/archives/mesa-dev/2015-December/103263.html

AFAIK there are 4 games that can use ATI_fs: KotOR 1&2, Doom 3, Quake 4.

Patches 1-3 implement ATI_fragment_shader, 4-7 are fixes for post-processing in 
KotOR

After this series the following issues remain with post-processing in KotOR 
that I've been unable to fix yet:

1. Enabling MSAA results in black screen when post-process is enabled, only the 
light bloom is visible. I don't know how to debug this.

2. Post-process filters are extremely slow. Normally the game runs at around 
80fps (cpu-bound), but drops to 15fps with framebuffer effects, 20fps with soft 
shadows, 9fps with both. I've tried to profile this with apitrace, and found a 
bottleneck (see patch 07) that cost 5ms per call, but it turned out that it's 
not the real bottleneck. Both capturing and replaying are very slow compared to 
the game (15fps), so the profiler basically measures its own latency. I've 
tried to find the real culprit by adding time measurement to the calls made 
when drawing the post-process effects, but haven't found anything yet.

MM

Miklós Máté (7):
  mesa: optionally associate a gl_program to ati_fragment_shader
  st/mesa: implement GL_ATI_fragment_shader
  st/mesa: enable GL_ATI_fragment_shader
  mesa: remove check_compatible() in make_current
  st/mesa: fix handling the fallback texture
  glx: remove incorrect refcounting of DRIdrawable
  mesa: optimize out the realloc from glCopyTexImagexD()

 src/glx/dri2_glx.c                                 |   4 -
 src/glx/dri3_glx.c                                 |   4 -
 src/glx/dri_common.c                               |  38 --
 src/glx/dri_glx.c                                  |   4 -
 src/glx/drisw_glx.c                                |   4 -
 src/glx/glxclient.h                                |   1 -
 src/mesa/Makefile.sources                          |   1 +
 src/mesa/drivers/common/driverfuncs.c              |   3 +
 .../drivers/dri/radeon/radeon_common_context.c     |   2 +-
 src/mesa/main/atifragshader.c                      |  13 +-
 src/mesa/main/blend.c                              |   4 +-
 src/mesa/main/blend.h                              |   4 +-
 src/mesa/main/context.c                            |  89 +--
 src/mesa/main/dd.h                                 |   7 +-
 src/mesa/main/mtypes.h                             |   8 +-
 src/mesa/main/pixel.c                              |   4 +-
 src/mesa/main/pixel.h                              |   4 +-
 src/mesa/main/state.c                              |  14 +-
 src/mesa/main/teximage.c                           |  32 +
 src/mesa/program/program.h                         |   2 +
 src/mesa/state_tracker/st_atifs_to_tgsi.c          | 734 +++++++++++++++++++++
 src/mesa/state_tracker/st_atifs_to_tgsi.h          |  65 ++
 src/mesa/state_tracker/st_atom_constbuf.c          |  14 +
 src/mesa/state_tracker/st_atom_sampler.c           |   6 +-
 src/mesa/state_tracker/st_atom_shader.c            |   5 +-
 src/mesa/state_tracker/st_cb_drawpixels.c          |   1 +
 src/mesa/state_tracker/st_cb_program.c             |  36 +-
 src/mesa/state_tracker/st_extensions.c             |   1 +
 src/mesa/state_tracker/st_program.c                |  30 +-
 src/mesa/state_tracker/st_program.h                |   4 +
 30 files changed, 977 insertions(+), 161 deletions(-)
 create mode 100644 src/mesa/state_tracker/st_atifs_to_tgsi.c
 create mode 100644 src/mesa/state_tracker/st_atifs_to_tgsi.h

-- 
2.7.0

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to