From 330925d9118120863f5e76e01fdfa1a1f44be2b1 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 23 Feb 2010 16:48:22 +0100 Subject: 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. --- src/gallium/drivers/nvfx/nvfx_fragtex.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/gallium/drivers/nvfx/nvfx_fragtex.c') diff --git a/src/gallium/drivers/nvfx/nvfx_fragtex.c b/src/gallium/drivers/nvfx/nvfx_fragtex.c index e239235c3f..f5f6b0c0cb 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 - } -}; -- cgit v1.2.3