diff options
author | Luca Barbieri <[email protected]> | 2010-02-23 16:48:22 +0100 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-04-12 12:21:25 +0200 |
commit | 330925d9118120863f5e76e01fdfa1a1f44be2b1 (patch) | |
tree | feb63f5237b7d1cc2cd8ff8a0f3f90774c030cb9 /src/gallium/drivers/nvfx/nvfx_fragtex.c | |
parent | 26e40448becb07e292d269dc4d8fbc56caebba3c (diff) |
nvfx: rework validation logic to use code and avoid stateobjs
This makes the code faster due to the lack of indirect calls and also
makes it much easier to understand what is actually going on.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_fragtex.c')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_fragtex.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_fragtex.c b/src/gallium/drivers/nvfx/nvfx_fragtex.c index e239235c3f5..f5f6b0c0cbd 100644 --- a/src/gallium/drivers/nvfx/nvfx_fragtex.c +++ b/src/gallium/drivers/nvfx/nvfx_fragtex.c @@ -1,7 +1,7 @@ #include "nvfx_context.h" #include "nvfx_resource.h" -static boolean +void nvfx_fragtex_validate(struct nvfx_context *nvfx) { struct nouveau_channel* chan = nvfx->screen->base.channel; @@ -9,7 +9,7 @@ nvfx_fragtex_validate(struct nvfx_context *nvfx) samplers = nvfx->dirty_samplers; if(!samplers) - return FALSE; + return; while (samplers) { unit = ffs(samplers) - 1; @@ -29,7 +29,6 @@ nvfx_fragtex_validate(struct nvfx_context *nvfx) } } nvfx->dirty_samplers = 0; - return FALSE; } void @@ -54,11 +53,3 @@ nvfx_fragtex_relocate(struct nvfx_context *nvfx) NV34TCL_TX_FORMAT_DMA0, NV34TCL_TX_FORMAT_DMA1); } } - -struct nvfx_state_entry nvfx_state_fragtex = { - .validate = nvfx_fragtex_validate, - .dirty = { - .pipe = NVFX_NEW_SAMPLER | NVFX_NEW_FRAGPROG, - .hw = 0 - } -}; |