diff options
author | Luca Barbieri <[email protected]> | 2010-08-18 22:57:22 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-20 12:04:06 +0200 |
commit | 4a5acc0ec7d6d94ea2a73b3d8ee498f75e929a1c (patch) | |
tree | 11fdf5ba9553b19a2caaddbd521b73ecf86b38bc /src/gallium/state_trackers/dri/common | |
parent | d4ec85e62423336d3cddc45f26bef6764f435a18 (diff) |
st/dri: use PIPE_TEXTURE_RECT if appropriate
Diffstat (limited to 'src/gallium/state_trackers/dri/common')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 6ad2c7da4d6..0ab4dd18931 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -383,6 +383,11 @@ dri_init_screen_helper(struct dri_screen *screen, if (!screen->st_api) return NULL; + if(pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) + screen->target = PIPE_TEXTURE_2D; + else + screen->target = PIPE_TEXTURE_RECT; + driParseOptionInfo(&screen->optionCache, __driConfigOptions, __driNConfigOptions); diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index 53ccce145ba..849f399b2f8 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -68,6 +68,7 @@ struct dri_screen boolean d_depth_bits_last; boolean sd_depth_bits_last; boolean auto_fake_front; + enum pipe_texture_target target; }; /** cast wrapper */ |