VirtualBox

Changeset 98906 in vbox for trunk/src


Ignore:
Timestamp:
Mar 10, 2023 4:18:56 PM (22 months ago)
Author:
vboxsync
Message:

Additions/3D/mesa: D3D9 fixes

Location:
trunk/src/VBox/Additions/3D/mesa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/3D/mesa/Makefile.kmk

    r98416 r98906  
    14751475        $(VBOX_MESA)/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
    14761476
     1477VBoxMesaSVGALib_SOURCES.debug  += \
     1478        $(VBOX_MESA)/src/gallium/drivers/svga/svgadump/svga_dump.c \
     1479        $(VBOX_MESA)/src/gallium/drivers/svga/svgadump/svga_shader_dump.c \
     1480        $(VBOX_MESA)/src/gallium/drivers/svga/svgadump/svga_shader_op.c
     1481
    14771482# 32 bit lib for 64 bit build
    14781483VBoxMesaSVGALib-x86_EXTENDS      = VBoxMesaSVGALib
  • trunk/src/VBox/Additions/3D/mesa/mesa-21.3.8/src/gallium/drivers/svga/svga_format.c

    r96488 r98906  
    6363   [ PIPE_FORMAT_B5G6R5_UNORM ] =          { SVGA3D_FORMAT_INVALID,      SVGA3D_B5G6R5_UNORM,         SVGA3D_B5G6R5_UNORM,         TF_GEN_MIPS },
    6464   [ PIPE_FORMAT_R10G10B10A2_UNORM ] =     { SVGA3D_R10G10B10A2_UNORM,   SVGA3D_R10G10B10A2_UNORM,    SVGA3D_R10G10B10A2_UNORM,    TF_GEN_MIPS },
     65#ifndef VBOX_WITH_MESA3D_NINE_SVGA
    6566   [ PIPE_FORMAT_L8_UNORM ] =              { SVGA3D_FORMAT_INVALID,      SVGA3D_FORMAT_INVALID,       SVGA3D_R8_UNORM,             TF_XXX1 },
     67#else
     68   [ PIPE_FORMAT_L8_UNORM ] =              { SVGA3D_FORMAT_INVALID,      SVGA3D_R8_UNORM,             SVGA3D_R8_UNORM,             TF_XXX1 },
     69#endif
    6670   [ PIPE_FORMAT_A8_UNORM ] =              { SVGA3D_FORMAT_INVALID,      SVGA3D_A8_UNORM,             SVGA3D_R8_UNORM,             TF_GEN_MIPS | TF_000X},
    6771   [ PIPE_FORMAT_I8_UNORM ] =              { SVGA3D_FORMAT_INVALID,      SVGA3D_FORMAT_INVALID,       SVGA3D_R8_UNORM,             TF_XXXX },
  • trunk/src/VBox/Additions/3D/mesa/mesa-21.3.8/src/gallium/drivers/svga/svga_shader.h

    r96488 r98906  
    9191      int aa_point_coord_index;
    9292      float alpha_ref;
     93#ifdef VBOX_WITH_MESA3D_NINE_SVGA
     94      /* Make sure that this FS corresponds to a particular VS. Fixes a case when the FS was paired
     95       * with one of two VSs where generics had different order. */
     96      unsigned prev_shader_id;
     97#endif
    9398   } fs;
    9499
  • trunk/src/VBox/Additions/3D/mesa/mesa-21.3.8/src/gallium/drivers/svga/svga_state_framebuffer.c

    r96488 r98906  
    598598      range_max = viewport->scale[2] *  1.0f + viewport->translate[2];
    599599      assert(range_min >= 0.0f);
     600
     601      /* 'clip_halfz' means that the svga gallium driver is a part of our D3D9 ('nine' based) user mode driver.
     602       * Therefore take into account that:
     603       * "In Direct3D 9, texel centers and pixel centers were a half unit apart."
     604       */
     605      if (svga_have_vgpu10(svga))
     606      {
     607          prescale->translate[0] += 0.5f;
     608          prescale->translate[1] += 0.5f;
     609      }
    600610   }
    601611   else
  • trunk/src/VBox/Additions/3D/mesa/mesa-21.3.8/src/gallium/drivers/svga/svga_state_fs.c

    r96488 r98906  
    198198      key->fs.gs_generic_outputs = svga->curr.gs->generic_outputs;
    199199      key->fs.layer_to_zero = !svga->curr.gs->base.info.writes_layer;
     200#ifdef VBOX_WITH_MESA3D_NINE_SVGA
     201      key->fs.prev_shader_id = svga->curr.gs->base.id;
     202#endif
    200203   } else {
    201204      key->fs.vs_generic_outputs = svga->curr.vs->generic_outputs;
    202205      key->fs.layer_to_zero = 1;
     206#ifdef VBOX_WITH_MESA3D_NINE_SVGA
     207      key->fs.prev_shader_id = svga->curr.vs->base.id;
     208#endif
    203209   }
    204210
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette