Merge branch '7.8'
[mesa.git] / src / gallium / drivers / svga / svga_screen.c
index 9a2e7c6f5b0da27d632a80a6177a53e4d94d06d4..aeda3dcad51cfb7b5d3674b9df0292c79154d7f0 100644 (file)
@@ -31,8 +31,8 @@
 #include "svga_winsys.h"
 #include "svga_context.h"
 #include "svga_screen.h"
-#include "svga_screen_texture.h"
-#include "svga_screen_buffer.h"
+#include "svga_resource_texture.h"
+#include "svga_resource.h"
 #include "svga_debug.h"
 
 #include "svga3d_shaderdefs.h"
@@ -248,7 +248,7 @@ svga_is_format_supported( struct pipe_screen *screen,
    assert(tex_usage);
 
    /* Override host capabilities */
-   if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET) {
+   if (tex_usage & PIPE_BIND_RENDER_TARGET) {
       switch(format) { 
 
       /* Often unsupported/problematic. This means we end up with the same
@@ -278,11 +278,11 @@ svga_is_format_supported( struct pipe_screen *screen,
       SVGA3dSurfaceFormatCaps mask;
       
       mask.value = 0;
-      if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET)
+      if (tex_usage & PIPE_BIND_RENDER_TARGET)
          mask.offscreenRenderTarget = 1;
-      if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL)
+      if (tex_usage & PIPE_BIND_DEPTH_STENCIL)
          mask.zStencil = 1;
-      if (tex_usage & PIPE_TEXTURE_USAGE_SAMPLER)
+      if (tex_usage & PIPE_BIND_SAMPLER_VIEW)
          mask.texture = 1;
 
       if ((result.u & mask.value) == mask.value)
@@ -295,7 +295,7 @@ svga_is_format_supported( struct pipe_screen *screen,
     * duplicated list of supported formats which is prone to getting
     * out of sync:
     */
-   if(tex_usage & (PIPE_TEXTURE_USAGE_RENDER_TARGET | PIPE_TEXTURE_USAGE_DEPTH_STENCIL))
+   if(tex_usage & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL))
       return svga_translate_format_render(format) != SVGA3D_FORMAT_INVALID;
    else
       return svga_translate_format(format) != SVGA3D_FORMAT_INVALID;
@@ -397,8 +397,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
    screen->fence_finish = svga_fence_finish;
    svgascreen->sws = sws;
 
-   svga_screen_init_texture_functions(screen);
-   svga_screen_init_buffer_functions(screen);
+   svga_init_screen_resource_functions(svgascreen);
 
    svgascreen->use_ps30 =
       sws->get_cap(sws, SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION, &result) &&