diff options
author | Dave Airlie <[email protected]> | 2011-08-29 14:35:16 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-09-02 10:48:09 +0100 |
commit | 0b666106c5f75b581ef1ebeb354c29a00400404f (patch) | |
tree | d8c2a054a0002181f10e2694855782446d351884 /src/gallium/drivers | |
parent | 2083a276eb270b748d1c2668eb9faa5aadc8e700 (diff) |
gallium: add caps for MIN/MAX texel offsets.
As per Brian's suggestion, add caps for drivers that support texture
offsets to advertise a min/max via TGSI, also use it in the state tracker.
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 821c0d75973..e02da6e4d98 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -407,6 +407,12 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_TIMER_QUERY: return r600_get_clock_crystal_freq(rscreen->radeon) != 0; + case PIPE_CAP_MIN_TEXEL_OFFSET: + return -8; + + case PIPE_CAP_MAX_TEXEL_OFFSET: + return 7; + default: R600_ERR("r600: unknown param %d\n", param); return 0; diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 960ab8c96ae..d22ed4cdcaf 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -131,6 +131,10 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_ARRAY_TEXTURES: return 1; + case PIPE_CAP_MIN_TEXEL_OFFSET: + return -8; + case PIPE_CAP_MAX_TEXEL_OFFSET: + return 7; default: return 0; } |