L2 Cache Gpu

Discussion in 'Hardware' started by SpeedUp, Aug 31, 2016.

  1. SpeedUp

    SpeedUp Private E-2

    Hey guys, does somebody know how to flush the l2 cache of the gpu and unload a clean NvAPI to the cache?

    Using windows 10 with gtx 970.

    Thanks in advance .
     
  2. Digerati

    Digerati Major Geek Extraordinaire

    To flush the cache, just power down the computer and unplug it from the wall for about 10 - 15 seconds. Reboot and the cache will be reloaded as needed.
     
  3. SpeedUp

    SpeedUp Private E-2

    I mean GPU l2 cache not CPU....
     
  4. Digerati

    Digerati Major Geek Extraordinaire

    You said L2 cache of the GPU. So I understood that. No processor, whether CPU or GPU can retain any data once all the power is removed. Unplugging from the wall ensures all power, including standby power is removed - thus purging any cache memory.
     
  5. SpeedUp

    SpeedUp Private E-2

    Probably i was not spezefic enough...

    DESCRIPTION: Decrements the ref-counter and when it reaches ZERO, unloads NVAPI library. This must be called in pairs with NvAPI_Initialize.

    SUPPORTED OS: Windows XP and higher

    Note: By design, it is not mandatory to call NvAPI_Initialize before calling any NvAPI. When any NvAPI is called without first calling NvAPI_Initialize, the internal refcounter will be implicitly incremented. In such cases, calling NvAPI_Initialize from a different thread will result in incrementing the refcount again and the user has to call NvAPI_Unload twice to unload the library. However, note that the implicit increment of the refcounter happens only once. If the client wants unload functionality, it is recommended to always call NvAPI_Initialize and NvAPI_Unload in pairs.

    Unloading NvAPI library is not supported when the library is in a resource locked state. Some functions in the NvAPI library initiates an operation or allocates certain resources and there are corresponding functions available, to complete the operation or free the allocated resources. All such function pairs are designed to prevent unloading NvAPI library.

    For example, if NvAPI_Unload is called after NvAPI_XXX which locks a resource, it fails with NVAPI_ERROR. Developers need to call the corresponding NvAPI_YYY to unlock the resources, before calling NvAPI_Unload again.

    Return values:
    NVAPI_ERROR One or more resources are locked and hence cannot unload NVAPI library
    NVAPI_OK NVAPI library unloaded

    This is what i want to do, unlock the ressources and unload the variant,
    the underlined black sentences,
    Because mine is stucked and bugged
     
  6. Digerati

    Digerati Major Geek Extraordinaire

    I have no clue how those NvAPI calls work but I do know they have nothing to do with the cache of a processor. The cache is just a temporary storage location for data, like a buffer or the Page File on the hard drive. What you describe is more like routine in the NVIDIA driver.

    Edit add: You might do better to ask your question over at NVIDIA.
     
  7. SpeedUp

    SpeedUp Private E-2

    Yeah its also connected to the driver, I will describe u my problem in scenario:

    Imagine running a game such as GTA V. The first time you run it the settings are usually set on lowest meaning no AF or AA, low shadow resolution and distance. So the NvAPI takes these settings and unloads them into the L2 Cache of GPU so that the Stream-multiprocessors can read them and when ever you exit the game NvAPI should force the GPU to flush the settings by writing Global Settings into the cache area. For some reason it's stuck. It can happen when you change a setting by dramatically tuning it up and the variant is not fast enough to rewrite. Now the settings cannot be verified by any variant in order to be flushed. The only way to fix this is to find the way to flush the cache and unload a clean NvAPI into the cache. Now this also answers why this happens again when you insert new parts into the PC and that is because the drivers always keep the same buggy variant in their backup files and loads it into memory if its missing. It also works the other way, if you reinstall the drivers, it automatically reads the variants setting from the cache and make a copy of the variant.

    This cause plenty of problems in all games, from flimmering jagged edges/shadow acne/low detailed textures etc.
    Yeah im talking with nvidia atm...
     
  8. Digerati

    Digerati Major Geek Extraordinaire

    That may be while there is still power to the device. But removing power will clear all volatile memory devices - including integrated caches.
     
  9. SpeedUp

    SpeedUp Private E-2

    the problem with GPU is that the electricity is stored in the capacitors and discharging the electricity cannot be easy plus as soon as you discharge them thousands of transistors in GPU (8000 in 980ti) would push the electricity back... thats how the devices save their settings
     
  10. the mekanic

    the mekanic Major Mekanical Geek

  11. Digerati

    Digerati Major Geek Extraordinaire

    Sorry, but that is not correct at all.

    First, not all capacitors are "storage" capacitors. There are no storage caps on a graphics card; there does not need to be. But even if there were, circuits using storage capacitors always include "bleeder resistors" or similar devices to bleed off and discharge those caps once power is removed.

    Second, these transistors don't "push" electricity. They have "gates" that open and close (flip and flop) to "pass" the current through in one direction or another. But once again, if all power to the computer is removed by unplugging the computer from the wall, there will be NO current flow anywhere, and all volatile memory devices (including RAM and processors and their L level caches) will almost instantly be purged of any data they previously held.
     
    the mekanic likes this.
  12. SpeedUp

    SpeedUp Private E-2

    If it was so easy ,people wouldnt go thru the trouble of coding a shader just to flush it
     
  13. Digerati

    Digerati Major Geek Extraordinaire

    Sorry, but it seems you are confused. This issue with shader cache involved dumping that cache onto the hard drive. That is NOT "L2" cache which is what you were inquiring about.

    L2 cache is totally different from a cache on the drive.

    L2 cache in built into the processor and it is so easy to flush it - just kill the power.
     
    the mekanic likes this.
  14. SpeedUp

    SpeedUp Private E-2

    Yeah ur probably right , thanks.

    I have some other questions to find my cause , maybe u have some answers:

    1. Is it possible for the Depth map to get damaged while being generated in the vertex shader? how bout when it combines with a color map in pixel shader?

    2. What can cause Shadow cascade blending to be broken in all games?

    3. Why are some shadows blocky even though the mesh or terrain is using a high resolution lightmap?

    4. How is transparency aliasing effected by fog and lighting?

    5. If Shadow acne is noticeable in all game engines (each using different shading system) then what can be a possible reason hardware-wise?
     
  15. Digerati

    Digerati Major Geek Extraordinaire

    As I noted above, these questions may be better answered at NVIDIA Forums where there is a concentration of posters (and NVIDIA developers) who have more experience in these issues. There may be some here more qualified to answer than me and you can certainly wait and see if someone else joins in. Other wise, for faster answers, I would go there. Please do, however come back with a status update.
     
  16. the mekanic

    the mekanic Major Mekanical Geek

    Imandy Mann likes this.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds