Jump to content

  • Log In with Google      Sign In   
  • Create Account

Zaoshi Kaba

Member Since 04 Nov 2012
Offline Last Active Today, 12:43 PM

Posts I've Made

In Topic: When you realize how dumb a bug is...

18 July 2016 - 01:53 PM

Today, at work I wrote code equivalent to this and spent over an hour debugging why username was randomly becoming empty. FML

// LPCWSTR username
if(username) {
	AutoPtr<WCHAR> ptrUsername = wcsdup(username); // cannot modify const so we duplicate
	username = removeLeadingWhitespace(ptrUsername.get()); // modifies
	username = removeTrailingWhitespace(username); // modifies
// use username sometime later

In Topic: [D3D11]Any explanation for a temporary performance hit on binding a 4k by 4k...

02 July 2016 - 11:11 AM

4k x 4k texture is about 67 MB (depends on format), so it's not exactly small. My GPU has 2 GB dedicated and video player eats 1.5 GB. Most software does wonders at memory consumption. Especially Chrome.

You can use this tool but I'm not sure how accurate it is: https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

In Topic: [D3D11]Any explanation for a temporary performance hit on binding a 4k by 4k...

02 July 2016 - 04:32 AM

Are you sure your GPU has enough memory? System will silently transfer data between GRAM and RAM.

Your explanation reminds me of situation I had in a game I played: I had 60 FPS with static scene but whenever I turned camera it dropped to 10 FPS only because PC didn't have enough GRAM to fit all textures at once.

In Topic: What maximum amount of flood fill can a dijkstra handle?

23 June 2016 - 12:01 AM

Slightly off topic, but I want to ask.


Most games use the A* (A star) algorithm, which is Dijkstra's single pair shortest path algorithm plus a small heuristic value to speed up the search a bit, at the cost of potentially not being optimal.


In which cases it would not be optimal? I thought it always takes the most optimal path.

In Topic: Diagsession files?

25 April 2016 - 01:51 PM

Just .zip it.