nvfx: rework render temps code and fixes
cover nvfx: rework render temps code and fixes
This patch series silences some unknown cap warnings and fixes up
coding style (patch 1+4).
The most important part of this series are the two patches in the
middle. They rework the state_fb code, so that we are able to
render to not 64 byte aligned targets, as this is the only real
use-case for render temporaries this allows us to drop temp code
completely and simplifies a lot of cases.
This is only tested on nv49, but there should be nothing different
in this area for other nv3x or nv4x gpus.
I plan on working on top of that in the following days, so please
review and apply as time permits.
Thanks,
Lucas
Lucas Stach (4):
nvfx: say no to stream output caps
nvfx: rework state_fb code to get rid of render temps
nvfx: drop render temporaries code
nvfx: random cleanups of the state validation code
src/gallium/drivers/nvfx/nvfx_context.h | 2 +- src/gallium/drivers/nvfx/nvfx_fragtex.c | 4 - src/gallium/drivers/nvfx/nvfx_miptree.c | 18 +--- src/gallium/drivers/nvfx/nvfx_resource.h | 30 +----- src/gallium/drivers/nvfx/nvfx_screen.c | 6 +- src/gallium/drivers/nvfx/nvfx_state_emit.c | 94 +++++------------ src/gallium/drivers/nvfx/nvfx_state_fb.c | 155 ++++++++++----------------- src/gallium/drivers/nvfx/nvfx_surface.c | 136 +++---------------------- 8 files changed, 108 insertions(+), 337 deletions(-)
Signature · 1 line
1.7.7.5
A message that is not in the archive (sent off-list or not yet received): 1326195664-28384-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org
PATCH 1/4 nvfx: say no to stream output caps
nvfx doesn't support any kind of stream out, so silence the unused cap warnings.
--- src/gallium/drivers/nvfx/nvfx_screen.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
src/gallium/drivers/nvfx/nvfx_screen.c +5 -1
@@ -88,8 +88,12 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)case PIPE_CAP_MAX_TEXEL_OFFSET :case PIPE_CAP_CONDITIONAL_RENDER :case PIPE_CAP_TEXTURE_BARRIER : -return 0 ;case PIPE_CAP_MIXED_COLORBUFFER_FORMATS : +case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS : +case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS : +case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS : +case PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS : +case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS :return 0 ;default :NOUVEAU_ERR ("Warning: unknown PIPE_CAP %d\n" , param);
Signature · 1 line
1.7.7.5
Re: [PATCH 1/4] nvfx: say no to stream output caps
Pushed, thanks.
Marek
Quoted 29 lines · Lucas Stach
nvfx doesn't support any kind of stream out, so silence the unused cap warnings.
Signed-off-by Lucas Stach <[email protected]>---
src/gallium/drivers/nvfx/nvfx_screen.c | 6 +++++-1 files changed, 5 insertions(+), 1 deletions(-)src/gallium/drivers/nvfx/nvfx_screen.c +0
-0@@ -88,8 +88,12 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)case
PIPE_CAP_MAX_TEXEL_OFFSET:
casePIPE_CAP_CONDITIONAL_RENDER:
casePIPE_CAP_TEXTURE_BARRIER:
- return 0;
casePIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+ casePIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
+ casePIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
+ casePIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
+ casePIPE_CAP_TGSI_CAN_COMPACT_VARYINGS:
+ casePIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS:
return 0;
default:
NOUVEAU_ERR("Warning: unknownPIPE_CAP%d\n", param); --
1.7.7.5
Quoted 4 lines
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Quoted 9 lines · Le Tue, 10 Jan 2012 12:41:00 +0100 Lucas Stach…
This patch series silences some unknown cap warnings and fixes up coding style (patch 1+4).
The most important part of this series are the two patches in the middle. They rework the
state_fbcode, so that we are able to render to not 64 byte aligned targets, as this is the only real use-case for render temporaries this allows us to drop temp code completely and simplifies a lot of cases.
Quoted 8 lines
This is only tested on nv49, but there should be nothing different in this area for other nv3x or nv4x gpus.
I plan on working on top of that in the following days, so please review and apply as time permits.
Thanks,
Lucas
Hello,
I just tried on my NV34 the whole series. Here is what I noticed:
- Seems rendering is a bit slower (in ioquake3, in the first map q3dm0, rendering the mirror and the portal causes more audio stuttering) but it it just my feeling.
- ut2004demo hangs at start (display just one frame in the nvidia licence plate part), but the system does not crash, and the game can be killed.
Do you want me to check which of your patches makes ut2004 hanging?
Signature · 6 lines
Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux "who writes the code, decides"
A message that is not in the archive (sent off-list or not yet received): 20120114131404.3f742857.mandin.patrice-1tsiiZ//[email protected]
Am Samstag, den 14.01.2012, 13:14 +0100 schrieb Patrice Mandin:
Quoted 3 lines
Hello,
I just tried on my NV34 the whole series. Here is what I noticed:
Thanks for testing. Although now after some discussion it seems unlikely that we will see much of this in nvfx it really helps me to decide if i can go this way in the rewrite driver.
Quoted 4 lines
- Seems rendering is a bit slower (in ioquake3, in the first map q3dm0, rendering the mirror and the portal causes more audio stuttering) but it it just my feeling.
Without the render temps we should actually do less work, rather than more, so you shouldn't see any slowdown from this. Maybe we are hitting a slow path elsewhere in the driver (like a cpu copy of a gpu only surface).
Quoted 7 lines
- ut2004demo hangs at start (display just one frame in the nvidia licence plate part), but the system does not crash, and the game can be killed.
Do you want me to check which of your patches makes ut2004 hanging?
No, please just check dmesg, to see if you get any errors there. I will try to reproduce with my setup.
Thanks,
Lucas
I seems Marek has just accidentally pushed the whole series. So we have a bit of a difficult situation here. I'm not sure if we should just revert or if we can leave the patches upstream.
I'm aware that this patches haven't received much testing by others than me and that a review of the code is still oustanding, but I like to stress the point that these patches are rigorously tested by me and are relatively low risk.
Patrice your report of this patchset not working did surprise me, so can you please make sure those patches are really the cause for your issues? I heard reports that nv3x is not working properly with mesa/master for some time. I tried to reproduce the problem on my nv49 setup and I don't see any issues besides the well known vertex corruption, which is most likely due to some missing reloc somewhere or the like.
Regards,
Lucas
Am Montag, den 16.01.2012, 01:09 +0100 schrieb Lucas Stach:
Quoted 36 lines
Am Samstag, den 14.01.2012, 13:14 +0100 schrieb Patrice Mandin:
Quoted 3 lines
Hello,
I just tried on my NV34 the whole series. Here is what I noticed:
Thanks for testing. Although now after some discussion it seems unlikely that we will see much of this in nvfx it really helps me to decide if i can go this way in the rewrite driver.
Quoted 4 lines
- Seems rendering is a bit slower (in ioquake3, in the first map q3dm0, rendering the mirror and the portal causes more audio stuttering) but it it just my feeling.
Without the render temps we should actually do less work, rather than more, so you shouldn't see any slowdown from this. Maybe we are hitting a slow path elsewhere in the driver (like a cpu copy of a gpu only surface).
Quoted 7 lines
- ut2004demo hangs at start (display just one frame in the nvidia licence plate part), but the system does not crash, and the game can be killed.
Do you want me to check which of your patches makes ut2004 hanging?
No, please just check dmesg, to see if you get any errors there. I will try to reproduce with my setup.
Thanks,
Lucas_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 16 lines · Lucas Stach
I seems Marek has just accidentally pushed the whole series. So we have a bit of a difficult situation here. I'm not sure if we should just revert or if we can leave the patches upstream.
I'm aware that this patches haven't received much testing by others than me and that a review of the code is still oustanding, but I like to stress the point that these patches are rigorously tested by me and are relatively low risk.
Patrice your report of this patchset not working did surprise me, so can you please make sure those patches are really the cause for your issues? I heard reports that nv3x is not working properly with mesa/master for some time. I tried to reproduce the problem on my nv49 setup and I don't see any issues besides the well known vertex corruption, which is most likely due to some missing reloc somewhere or the like.
Quoted 3 lines
Regards,
Lucas
This should not have been pushed without at least having been tried on nv30. You can test every application on earth if you want, but there are nv30 code paths/limits/behaviours both in userspace and kernel that you'll never hit running on an nv40, so rigorous testing is irrelevant in that regard.
Of course the userbase for these cards is dwindling anyway so it's not a big deal as long as it can be fixed before it gets released.
Quoted 9 lines · Le Mon, 16 Jan 2012 17:33:46 +0100 Lucas Stach…
I seems Marek has just accidentally pushed the whole series. So we have a bit of a difficult situation here. I'm not sure if we should just revert or if we can leave the patches upstream.
I'm aware that this patches haven't received much testing by others than me and that a review of the code is still oustanding, but I like to stress the point that these patches are rigorously tested by me and are relatively low risk.
Quoted 6 lines
Patrice your report of this patchset not working did surprise me, so can you please make sure those patches are really the cause for your issues? I heard reports that nv3x is not working properly with mesa/master for some time. I tried to reproduce the problem on my nv49 setup and I don't see any issues besides the well known vertex corruption, which is most likely due to some missing reloc somewhere or the like.
Ok I'll try by cleaning and rebuilding everything in mesa. But maybe the issue I spotted is not as severe as it seems, if I can still reproduce it.
Signature · 6 lines
Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux "who writes the code, decides"
HI everyone,
first, I am not subscribed to the nouveau mailing list, so please CC me if you need anything.
I pushed the whole series because there was no feedback on mesa-dev for like 5 days. If you want to revert it, just let me know and I'll do it.
Marek
Quoted 58 lines · Lucas Stach
I seems Marek has just accidentally pushed the whole series. So we have a bit of a difficult situation here. I'm not sure if we should just revert or if we can leave the patches upstream.
I'm aware that this patches haven't received much testing by others than me and that a review of the code is still oustanding, but I like to stress the point that these patches are rigorously tested by me and are relatively low risk.
Patrice your report of this patchset not working did surprise me, so can you please make sure those patches are really the cause for your issues? I heard reports that nv3x is not working properly with mesa/master for some time. I tried to reproduce the problem on my nv49 setup and I don't see any issues besides the well known vertex corruption, which is most likely due to some missing reloc somewhere or the like.
Regards,
LucasAm Montag, den 16.01.2012, 01:09 +0100 schrieb Lucas Stach:
Quoted 36 lines
Am Samstag, den 14.01.2012, 13:14 +0100 schrieb Patrice Mandin:
Quoted 3 lines
Hello,
I just tried on my NV34 the whole series. Here is what I noticed:
Thanks for testing. Although now after some discussion it seems unlikely that we will see much of this in nvfx it really helps me to decide if i can go this way in the rewrite driver.
Quoted 4 lines
- Seems rendering is a bit slower (in ioquake3, in the first map q3dm0, rendering the mirror and the portal causes more audio stuttering) but it it just my feeling.
Without the render temps we should actually do less work, rather than more, so you shouldn't see any slowdown from this. Maybe we are hitting a slow path elsewhere in the driver (like a cpu copy of a gpu only surface).
Quoted 7 lines
- ut2004demo hangs at start (display just one frame in the nvidia licence plate part), but the system does not crash, and the game can be killed.
Do you want me to check which of your patches makes ut2004 hanging?
No, please just check dmesg, to see if you get any errors there. I will try to reproduce with my setup.
Thanks,
Lucas_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 2/4 nvfx: rework state_fb code to get rid of render temps
In reply to Lucas StachThis commit rewrites a lot of the state_fb code to support rendering to targets not aligned to 64 byte.
This allows us to drop the render temporaries as unaligned targets are the only use-case where they are really needed. The temporaries code was used for a lot of things more, but apparently those also work without temps.
There is one regression in piglit fbo-clear-formats, but this will be fixed with the use of real hardware clears and doesn't matter in practice as no real application tries to scissor clear a 2x2 pixel render target.
--- src/gallium/drivers/nvfx/nvfx_context.h | 2 +- src/gallium/drivers/nvfx/nvfx_state_emit.c | 59 ++--------- src/gallium/drivers/nvfx/nvfx_state_fb.c | 155 ++++++++++----------------- src/gallium/drivers/nvfx/nvfx_surface.c | 2 + 4 files changed, 72 insertions(+), 146 deletions(-)
src/gallium/drivers/nvfx/nvfx_context.h +1 -1
@@ -247,7 +247,7 @@ extern void nvfx_vtxfmt_validate(struct nvfx_context *nvfx);/* nvfx_fb.c */ extern int nvfx_framebuffer_prepare (struct nvfx_context *nvfx); -extern void nvfx_framebuffer_validate (struct nvfx_context *nvfx,unsigned prepare_result); +extern void nvfx_framebuffer_validate (struct nvfx_context *nvfx);void nvfx_framebuffer_relocate (struct nvfx_context *nvfx);
src/gallium/drivers/nvfx/nvfx_state_emit.c +11 -48
99 lines not on this page · raw message
src/gallium/drivers/nvfx/nvfx_state_fb.c +58 -97
191 lines not on this page · raw message
src/gallium/drivers/nvfx/nvfx_surface.c +2 -0
@@ -428,6 +428,8 @@ nvfx_surface_copy_temp(struct pipe_context* pipe, struct pipe_surface* surf, intvoid nvfx_surface_create_temp (struct pipe_context * pipe,struct pipe_surface * surf) { +assert (0 ); +struct nvfx_surface * ns = (struct nvfx_surface *)surf;struct pipe_resource template;memset (&template,0 ,sizeof (struct pipe_resource ));
Signature · 1 line
1.7.7.5
PATCH 3/4 nvfx: drop render temporaries code
In reply to Lucas StachThis code is unneeded now, we don't use render temps any more.
--- src/gallium/drivers/nvfx/nvfx_fragtex.c | 4 - src/gallium/drivers/nvfx/nvfx_miptree.c | 18 +--- src/gallium/drivers/nvfx/nvfx_resource.h | 30 +------ src/gallium/drivers/nvfx/nvfx_surface.c | 138 +++--------------------------- 4 files changed, 18 insertions(+), 172 deletions(-)
src/gallium/drivers/nvfx/nvfx_fragtex.c +0 -4
@@ -189,10 +189,6 @@ nvfx_fragtex_validate(struct nvfx_context *nvfx) samplers &= ~(1 << unit);if (nvfx->fragment_sampler_views[unit] && nvfx->tex_sampler[unit]) { -util_dirty_surfaces_use_for_sampling (&nvfx->pipe, - &((struct nvfx_miptree *)nvfx->fragment_sampler_views[unit]->texture)->dirty_surfaces, - nvfx_surface_flush); -if (!nvfx->is_nv4x)nv30_fragtex_set (nvfx, unit);else
src/gallium/drivers/nvfx/nvfx_miptree.c +4 -14
@@ -99,9 +99,7 @@ nvfx_miptree_layout(struct nvfx_miptree *mt)static void nvfx_miptree_surface_final_destroy (struct pipe_surface * ps) { -struct nvfx_surface * ns = (struct nvfx_surface *)ps;pipe_resource_reference (&ps->texture,0 ); -pipe_resource_reference ((struct pipe_resource **)&ns->temp,0 );FREE (ps); }
@@ -127,7 +125,6 @@ nvfx_miptree_create_skeleton(struct pipe_screen *pscreen, const struct pipe_resoreturn NULL ; mt->base.base = *pt; -util_dirty_surfaces_init (&mt->dirty_surfaces);pipe_reference_init (&mt->base.base.reference,1 ); mt->base.base.screen = pscreen;
@@ -201,24 +198,17 @@ nvfx_miptree_surface_new(struct pipe_context *pipe, struct pipe_resource *pt,if (util_surfaces_get (&mt->surfaces,sizeof (struct nvfx_surface ), pipe, pt, level, surf_tmpl->u.tex.first_layer, surf_tmpl->usage, (struct pipe_surface **)&ns)) { -util_dirty_surface_init (&ns->base); ns->pitch =nvfx_subresource_pitch (pt, level); ns->offset =nvfx_subresource_offset (pt, surf_tmpl->u.tex.first_layer, level, surf_tmpl->u.tex.first_layer); } -return &ns->base.base; +return &ns->base; }void nvfx_miptree_surface_del (struct pipe_context *pipe,struct pipe_surface *ps) { -struct nvfx_surface * ns = (struct nvfx_surface *)ps; - -if (!ns->temp) - { -assert (!util_dirty_surface_is_dirty (&ns->base)); -util_surfaces_detach (&((struct nvfx_miptree *)ps->texture)->surfaces, ps); -pipe_resource_reference (&ps->texture,0 ); -FREE (ps); - } +util_surfaces_detach (&((struct nvfx_miptree *)ps->texture)->surfaces, ps); +pipe_resource_reference (&ps->texture,0 ); +FREE (ps); }
src/gallium/drivers/nvfx/nvfx_resource.h +1 -29
@@ -47,18 +47,6 @@ nvfx_resource_on_gpu(struct pipe_resource* pr)#define NVFX_MAX_TEXTURE_LEVELS 16 -/* We have the following invariants for render temporaries -* -* 1. Render temporaries are always linear -* 2. Render temporaries are always up to date -* 3. Currently, render temporaries are destroyed when the resource is used for sampling, but kept for any other use -* -* Also, we do NOT flush temporaries on any pipe->flush(). -* This is fine, as long as scanout targets and shared resources never need temps. -* -* TODO: we may want to also support swizzled temporaries to improve performance in some cases. -*/ -struct nvfx_miptree {struct nvfx_resource base;
@@ -67,15 +55,12 @@ struct nvfx_miptree {unsigned level_offset[NVFX_MAX_TEXTURE_LEVELS ];struct util_surfaces surfaces; -struct util_dirty_surfaces dirty_surfaces; };struct nvfx_surface { -struct util_dirty_surface base; +struct pipe_surface base;unsigned pitch;unsigned offset; - -struct nvfx_miptree * temp; }; static INLINE struct nouveau_bo *
@@ -86,13 +71,6 @@ nvfx_surface_buffer(struct pipe_surface *surf)return mt->bo; } -static INLINE struct util_dirty_surfaces* -nvfx_surface_get_dirty_surfaces (struct pipe_surface * surf) -{ -struct nvfx_miptree *mt = (struct nvfx_miptree *)surf->texture; -return &mt->dirty_surfaces; -} -void nvfx_init_resource_functions (struct pipe_context *pipe);
@@ -159,12 +137,6 @@ nvfx_subresource_pitch(struct pipe_resource* pt, unsigned level) } } -void -nvfx_surface_create_temp (struct pipe_context * pipe,struct pipe_surface * surf); - -void -nvfx_surface_flush (struct pipe_context * pipe,struct pipe_surface * surf); -struct nvfx_buffer {struct nvfx_resource base;
src/gallium/drivers/nvfx/nvfx_surface.c +13 -125
158 lines not on this page · raw message
Signature · 1 line
1.7.7.5
PATCH 4/4 nvfx: random cleanups of the state validation code
In reply to Lucas Stach--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 49 ++++++++++++--------------- 1 files changed, 22 insertions(+), 27 deletions(-)
src/gallium/drivers/nvfx/nvfx_state_emit.c +22 -27
@@ -200,7 +200,6 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)unsigned dirty;unsigned still_dirty =0 ;boolean flush_tex_cache = FALSE; -unsigned render_temps;if (nvfx != nvfx->screen->cur_ctx) {
@@ -212,14 +211,6 @@ nvfx_state_validate_common(struct nvfx_context *nvfx) nvfx->relocs_needed =NVFX_RELOCATE_ALL ; } -if (nvfx->dirty &NVFX_NEW_SAMPLER ) { - nvfx->dirty &=~NVFX_NEW_SAMPLER ; -nvfx_fragtex_validate (nvfx); - -// TODO: only set this if really necessary - flush_tex_cache = TRUE; - } - dirty = nvfx->dirty;if (nvfx->render_mode ==HW )
@@ -252,6 +243,13 @@ nvfx_state_validate_common(struct nvfx_context *nvfx) } } +if (dirty &NVFX_NEW_SAMPLER ) { +nvfx_fragtex_validate (nvfx); + +// TODO: only set this if really necessary + flush_tex_cache = TRUE; + } +if (dirty &NVFX_NEW_RAST )sb_emit (chan, nvfx->rasterizer->sb, nvfx->rasterizer->sb_len);
@@ -264,10 +262,13 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)if (nvfx->dirty & (NVFX_NEW_UCP |NVFX_NEW_RAST ))nvfx_ucp_validate (nvfx); -if (nvfx->use_vp_clipping && (nvfx->dirty & (NVFX_NEW_UCP |NVFX_NEW_VERTPROG |NVFX_NEW_RAST ))) +if (nvfx->use_vp_clipping && (nvfx->dirty & + (NVFX_NEW_UCP |NVFX_NEW_VERTPROG | +NVFX_NEW_RAST )))nvfx_vertprog_ucp_validate (nvfx); -if (dirty & (NVFX_NEW_FRAGPROG |NVFX_NEW_FRAGCONST |NVFX_NEW_VERTPROG |NVFX_NEW_SPRITE )) +if (dirty & (NVFX_NEW_FRAGPROG |NVFX_NEW_FRAGCONST | +NVFX_NEW_VERTPROG |NVFX_NEW_SPRITE )) {nvfx_fragprog_validate (nvfx);if (dirty &NVFX_NEW_FRAGPROG )
@@ -302,11 +303,7 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)if (dirty &NVFX_NEW_SR )nvfx_state_sr_validate (nvfx); -/* All these dependencies are wrong, but otherwise -etracer, neverball, foobillard, glest totally misrender -TODO: find the right fix -*/ -if (dirty & (NVFX_NEW_VIEWPORT |NVFX_NEW_RAST |NVFX_NEW_ZSA )) +if (dirty &NVFX_NEW_VIEWPORT ) {nvfx_state_viewport_validate (nvfx); }
@@ -314,23 +311,21 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)if (dirty & (NVFX_NEW_ZSA |NVFX_NEW_FB )) {BEGIN_RING (chan, eng3d,NV30_3D_DEPTH_WRITE_ENABLE ,2 ); -OUT_RING (chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.writemask); -OUT_RING (chan, nvfx->framebuffer.zsbuf && nvfx->zsa->pipe.depth.enabled); +OUT_RING (chan, nvfx->framebuffer.zsbuf && + nvfx->zsa->pipe.depth.writemask); +OUT_RING (chan, nvfx->framebuffer.zsbuf && + nvfx->zsa->pipe.depth.enabled); }if (dirty & (NVFX_NEW_FRAGPROG |NVFX_NEW_FB ))nvfx_coord_conventions_validate (nvfx); -if (flush_tex_cache) +if (flush_tex_cache && nvfx->is_nv4x) { -// TODO: what about nv30? -if (nvfx->is_nv4x) - { -BEGIN_RING (chan, eng3d,NV40_3D_TEX_CACHE_CTL ,1 ); -OUT_RING (chan,2 ); -BEGIN_RING (chan, eng3d,NV40_3D_TEX_CACHE_CTL ,1 ); -OUT_RING (chan,1 ); - } +BEGIN_RING (chan, eng3d,NV40_3D_TEX_CACHE_CTL ,1 ); +OUT_RING (chan,2 ); +BEGIN_RING (chan, eng3d,NV40_3D_TEX_CACHE_CTL ,1 ); +OUT_RING (chan,1 ); } nvfx->dirty = dirty & still_dirty;
Signature · 1 line
1.7.7.5
A message that is not in the archive (sent off-list or not yet received): 1326195664-28384-5-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org
Re: [PATCH 4/4] nvfx: random cleanups of the state validation code
Quoted 7 lines · Le Tue, 10 Jan 2012 12:41:04 +0100 Lucas Stach…
Signed-off-by Lucas Stach <[email protected]>--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 49 ++++++++++++--------------- 1 files changed, 22 insertions(+), 27 deletions(-)src/gallium/drivers/nvfx/nvfx_state_emit.c +0
-0
[snip]
src/gallium/drivers/nvfx/nvfx_state_emit.c nvfx_state_validate_common(struct nvfx_context *nvfx) · line 309
Quoted 13 lines
src/gallium/drivers/nvfx/nvfx_state_emit.c +1
-5@@ -302,11 +303,7 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)if (dirty &NVFX_NEW_SR )nvfx_state_sr_validate (nvfx); -/* All these dependencies are wrong, but otherwise -etracer, neverball, foobillard, glest totally misrender -TODO: find the right fix -*/ -if (dirty & (NVFX_NEW_VIEWPORT |NVFX_NEW_RAST |NVFX_NEW_ZSA )) +if (dirty &NVFX_NEW_VIEWPORT ) {nvfx_state_viewport_validate (nvfx); }
[snip]
After a small revert/compile/try, reverting just that part makes rendering working again in ut2004demo.
I noticed another small regressing with it, the splashscreen bitmap is also not displayed anymore, so I'll investigate a bit further. Maybe no need to revert the whole series.
Signature · 6 lines
Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux "who writes the code, decides"
Re: [Nouveau] [PATCH 4/4] nvfx: random cleanups of the state validation code
Am Dienstag, den 17.01.2012, 18:22 +0100 schrieb Patrice Mandin:
Quoted 26 lines
Quoted 7 lines · Le Tue, 10 Jan 2012 12:41:04 +0100 Lucas Stach <[email protected]> a écrit:
Signed-off-by Lucas Stach <[email protected]>--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 49 ++++++++++++--------------- 1 files changed, 22 insertions(+), 27 deletions(-)src/gallium/drivers/nvfx/nvfx_state_emit.c +0
-0[snip]
Quoted 13 lines
src/gallium/drivers/nvfx/nvfx_state_emit.c +1
-5@@ -302,11 +303,7 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)if (dirty &NVFX_NEW_SR )nvfx_state_sr_validate (nvfx); -/* All these dependencies are wrong, but otherwise -etracer, neverball, foobillard, glest totally misrender -TODO: find the right fix -*/ -if (dirty & (NVFX_NEW_VIEWPORT |NVFX_NEW_RAST |NVFX_NEW_ZSA )) +if (dirty &NVFX_NEW_VIEWPORT ) {nvfx_state_viewport_validate (nvfx); }[snip]
Quoted 2 lines
After a small revert/compile/try, reverting just that part makes rendering working again in ut2004demo.
Thanks for taking the time to hunt this down. So the comment was not specific enough and so I was led into the illusion that this junk is safe to remove after testing all the apps listed there.
So it seems this workaround is needed for nv3x. I will send a follow up patch to correct this.
Quoted 5 lines
I noticed another small regressing with it, the splashscreen bitmap is also not displayed anymore, so I'll investigate a bit further. Maybe no need to revert the whole series.
Woah, nv3x really has some weird problems. My nv49 shows the splashscreen just fine. Fortunately I get a nv35 myself in the near future, so I can test this on my own.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Nouveau] [PATCH 4/4] nvfx: random cleanups of the state validation code
In reply to Patrice MandinQuoted 11 lines · Le Tue, 17 Jan 2012 18:22:59 +0100 Patrice Mandin <[email protected]> a…
Quoted 7 lines · Le Tue, 10 Jan 2012 12:41:04 +0100 Lucas Stach <[email protected]> a écrit:
Signed-off-by Lucas Stach <[email protected]>--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 49 ++++++++++++--------------- 1 files changed, 22 insertions(+), 27 deletions(-)src/gallium/drivers/nvfx/nvfx_state_emit.c +0
-0[snip]
@@ -212,14 +211,6 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
nvfx->relocs_needed = NVFX_RELOCATE_ALL;
}
- if(nvfx->dirty & NVFX_NEW_SAMPLER) {
- nvfx->dirty &=~ NVFX_NEW_SAMPLER;
- nvfx_fragtex_validate(nvfx);
-
- // TODO: only set this if really necessary
- flush_tex_cache = TRUE;
- }
-
dirty = nvfx->dirty;
if(nvfx->render_mode == HW)
@@ -252,6 +243,13 @@ nvfx_state_validate_common(struct nvfx_context *nvfx)
}
}
+ if(dirty & NVFX_NEW_SAMPLER) {
+ nvfx_fragtex_validate(nvfx);
+
+ // TODO: only set this if really necessary
+ flush_tex_cache = TRUE;
+ }
+
if(dirty & NVFX_NEW_RAST)
sb_emit(chan, nvfx->rasterizer->sb, nvfx->rasterizer->sb_len);
Quoted 3 lines
I noticed another small regression with it, the splashscreen bitmap is also not displayed anymore, so I'll investigate a bit further. Maybe no need to revert the whole series.
And the above part triggers it, the missing nvfx->dirty &=~ NVFX_NEW_SAMPLER; in the change causes this regression.
Signature · 6 lines
Patrice Mandin WWW: http://pmandin.atari.org/ Programmeur Linux, Atari Spécialité: Développement, jeux "who writes the code, decides"
A message that is not in the archive (sent off-list or not yet received): 20120118215414.1aef2da3.mandin.patrice-1tsiiZ//[email protected]
Re: [Mesa-dev] [PATCH 4/4] nvfx: random cleanups of the state validation code
Am Mittwoch, den 18.01.2012, 21:54 +0100 schrieb Patrice Mandin:
Quoted 47 lines
Quoted 11 lines · Le Tue, 17 Jan 2012 18:22:59 +0100 Patrice Mandin <[email protected]> a…
Quoted 7 lines · Le Tue, 10 Jan 2012 12:41:04 +0100 Lucas Stach <[email protected]> a écrit:
Signed-off-by Lucas Stach <[email protected]>--- src/gallium/drivers/nvfx/nvfx_state_emit.c | 49 ++++++++++++--------------- 1 files changed, 22 insertions(+), 27 deletions(-)src/gallium/drivers/nvfx/nvfx_state_emit.c +0
-0[snip]
src/gallium/drivers/nvfx/nvfx_state_emit.c +7
-8@@ -212,14 +211,6 @@ nvfx_state_validate_common(struct nvfx_context *nvfx) nvfx->relocs_needed =NVFX_RELOCATE_ALL ; } -if (nvfx->dirty &NVFX_NEW_SAMPLER ) { - nvfx->dirty &=~NVFX_NEW_SAMPLER ; -nvfx_fragtex_validate (nvfx); - -// TODO: only set this if really necessary - flush_tex_cache = TRUE; - } - dirty = nvfx->dirty;if (nvfx->render_mode ==HW )@@ -252,6 +243,13 @@ nvfx_state_validate_common(struct nvfx_context *nvfx) } } +if (dirty &NVFX_NEW_SAMPLER ) { +nvfx_fragtex_validate (nvfx); + +// TODO: only set this if really necessary + flush_tex_cache = TRUE; + } +if (dirty &NVFX_NEW_RAST )sb_emit (chan, nvfx->rasterizer->sb, nvfx->rasterizer->sb_len);Quoted 3 lines
I noticed another small regression with it, the splashscreen bitmap is also not displayed anymore, so I'll investigate a bit further. Maybe no need to revert the whole series.
Quoted 3 lines
And the above part triggers it, the missing
nvfx->dirty&=~NVFX_NEW_SAMPLER; in the change causes this regression.
So the supposedly low risk cleanups broke all of those things. Thanks to take the time to track this down to this level. Will fix it up soon.
Thanks,
Lucas
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau