diff options
author | Charmaine Lee <[email protected]> | 2016-04-22 16:06:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-04-25 12:59:29 -0600 |
commit | c4cb879f00de89c300462e7b2d0f221d920c396f (patch) | |
tree | 8c6b251b6cdb626832ffa52de4b149a503300956 /src/gallium/drivers/svga/svga_state_constants.c | |
parent | 686cd3c606536cff3fe6d80f8ebeeca7afa1b37e (diff) |
svga: eliminiate unnecessary constant buffer updates
Currently if the texture binding is changed, emit_fs_consts()
is triggered to update texture scaling factor for
rectangle texture or texture buffer size in the constant buffer.
But the update is only relevant if the texture binding includes
a rectangle texture or a texture buffer.
To eliminate the unnecessary constant buffer updates due to other texture
binding changes, a new flag SVGA_NEW_TEXTURE_CONSTS will be used
to trigger fragment shader constant buffer update when a rectangle texture
or a texture buffer is bound.
With this patch, the number of constant buffer updates in Lightsmark2008
reduces from hundreds per frame to about 28 per frame.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_constants.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_constants.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c index 51f393f9b0c..8784f47413f 100644 --- a/src/gallium/drivers/svga/svga_state_constants.c +++ b/src/gallium/drivers/svga/svga_state_constants.c @@ -788,7 +788,7 @@ struct svga_tracked_state svga_hw_fs_constants = "hw fs params", (SVGA_NEW_FS_CONST_BUFFER | SVGA_NEW_FS_VARIANT | - SVGA_NEW_TEXTURE_BINDING), + SVGA_NEW_TEXTURE_CONSTS), emit_fs_consts }; |