diff options
Diffstat (limited to 'src/gallium/drivers/nvfx')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_screen.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_surface.c | 8 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c index 2bcb93d93e3..2b1510264a1 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.c +++ b/src/gallium/drivers/nvfx/nvfx_context.c @@ -13,7 +13,7 @@ nvfx_flush(struct pipe_context *pipe, struct nvfx_context *nvfx = nvfx_context(pipe); struct nvfx_screen *screen = nvfx->screen; struct nouveau_channel *chan = screen->base.channel; - struct nouveau_grobj *eng3d = screen->eng3d; + /*struct nouveau_grobj *eng3d = screen->eng3d;*/ /* XXX: we need to actually be intelligent here */ /* XXX This flag wasn't set by the state tracker anyway. */ diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c index 8742f60c163..4a97dfb9c25 100644 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@ -1,5 +1,6 @@ #include "pipe/p_screen.h" #include "pipe/p_state.h" +#include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_simple_screen.h" @@ -82,6 +83,8 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 0; // TODO: implement primitive restart case PIPE_CAP_SHADER_STENCIL_EXPORT: return 0; + case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: + return 0; default: NOUVEAU_ERR("Warning: unknown PIPE_CAP %d\n", param); return 0; @@ -207,6 +210,9 @@ nvfx_screen_is_format_supported(struct pipe_screen *pscreen, { struct nvfx_screen *screen = nvfx_screen(pscreen); + if (!util_format_is_supported(format, bind)) + return FALSE; + if (sample_count > 1) return FALSE; diff --git a/src/gallium/drivers/nvfx/nvfx_surface.c b/src/gallium/drivers/nvfx/nvfx_surface.c index be31853d717..ced26494e15 100644 --- a/src/gallium/drivers/nvfx/nvfx_surface.c +++ b/src/gallium/drivers/nvfx/nvfx_surface.c @@ -33,6 +33,7 @@ #include "util/u_memory.h" #include "util/u_pack_color.h" #include "util/u_blitter.h" +#include "util/u_surface.h" #include "nouveau/nouveau_winsys.h" #include "nouveau/nouveau_screen.h" @@ -252,6 +253,13 @@ nvfx_resource_copy_region(struct pipe_context *pipe, if(!w || !h) return; + /* Fallback for buffers. */ + if (dstr->target == PIPE_BUFFER && srcr->target == PIPE_BUFFER) { + util_resource_copy_region(pipe, dstr, dst_level, dstx, dsty, dstz, + srcr, src_level, src_box); + return; + } + if(copy_threshold < 0) copy_threshold = debug_get_num_option("NOUVEAU_COPY_THRESHOLD", 4); |