VirtualBox

Changeset 81980 in vbox for trunk/src


Ignore:
Timestamp:
Nov 19, 2019 10:08:29 AM (5 years ago)
Author:
vboxsync
Message:

Devices/Graphics: log the shader float constants as floats

Location:
trunk/src/VBox/Devices/Graphics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r81978 r81980  
    67396739            {
    67406740                float *pValuesF = (float *)pValues;
    6741                 Log(("ConstantF %d: value=%d, %d, %d, %d\n", reg + i, (int)(pValuesF[i*4 + 0] * 100.0f), (int)(pValuesF[i*4 + 1] * 100.0f), (int)(pValuesF[i*4 + 2] * 100.0f), (int)(pValuesF[i*4 + 3] * 100.0f)));
     6741                Log(("ConstantF %d: value=" FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR "\n",
     6742                     reg + i, FLOAT_FMT_ARGS(pValuesF[i*4 + 0]), FLOAT_FMT_ARGS(pValuesF[i*4 + 1]), FLOAT_FMT_ARGS(pValuesF[i*4 + 2]), FLOAT_FMT_ARGS(pValuesF[i*4 + 3])));
    67426743                break;
    67436744            }
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp

    r81978 r81980  
    57065706            {
    57075707                float *pValuesF = (float *)pValues;
    5708                 Log(("ConstantF %d: value=%d, %d, %d, %d\n", reg + i, (int)(pValuesF[i*4 + 0] * 10000.0f), (int)(pValuesF[i*4 + 1] * 10000.0f), (int)(pValuesF[i*4 + 2] * 10000.0f), (int)(pValuesF[i*4 + 3] * 10000.0f)));
     5708                Log(("ConstantF %d: value=" FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR "\n",
     5709                     reg + i, FLOAT_FMT_ARGS(pValuesF[i*4 + 0]), FLOAT_FMT_ARGS(pValuesF[i*4 + 1]), FLOAT_FMT_ARGS(pValuesF[i*4 + 2]), FLOAT_FMT_ARGS(pValuesF[i*4 + 3])));
    57095710                break;
    57105711            }
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h

    r76565 r81980  
    4444/**@def FLOAT_FMT_STR
    4545 * Format string bits to go with FLOAT_FMT_ARGS. */
    46 #define FLOAT_FMT_STR                           "%d.%06u"
     46#define FLOAT_FMT_STR                           "%s%u.%06u"
    4747/** @def FLOAT_FMT_ARGS
    4848 * Format arguments for a float value, corresponding to FLOAT_FMT_STR.
    4949 * @param   r       The floating point value to format.  */
    50 #define FLOAT_FMT_ARGS(r)                       (int)(r), ((unsigned)(RT_ABS(r) * 1000000) % 1000000U)
     50#define FLOAT_FMT_ARGS(r)                       (r) >= 0.0f ? "" : "-", (unsigned)RT_ABS(r), (unsigned)(RT_ABS((r) - (unsigned)(r)) * 1000000.0f)
    5151
    5252
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