Compiled for 64-bits:
sizeof(D3D11_DEPTH_STENCIL_DESC) = 52 sizeof(D3D11_DEPTH_STENCIL_VIEW_DESC) = 24
Confirming that they are indeed unchanged in size from 32-bits.
Compiled for 64-bits:
sizeof(D3D11_DEPTH_STENCIL_DESC) = 52 sizeof(D3D11_DEPTH_STENCIL_VIEW_DESC) = 24
Richard Russell wrote: ↑Thu 23 Apr 2026, 13:01
I commonly check the sizes of structures by compiling them. You don't need entire SDKs or IDEs for that, just the relevant header (.h) file which can usually be found at GitHub. Here's an extract from the output from just such a program of mine:
... sizeof(WSADATA) = 400 sizeof(DXGI_SWAP_CHAIN_DESC) = 60
That's true, but it's a massive install and I would have concerns about it interfering with existing development tools (e.g. C compilers and linkers) if utilities or files with the same name were to be added to the PATH by that installation. Anybody developing Windows applications will already have all the relevant header files (in my case installed automatically by MinGW).JeremyNicoll wrote: ↑Thu 23 Apr 2026, 15:41 The only reason I thought of VS CE is that some of the StackOverflow posts I read seemed to imply that it comes with many/most/some sets of standard header files...
GCC, it's by far the most popular non-proprietary (i.e. non-Microsoft and non-Intel) compiler (I know there's Clang, but as discussed in a recent thread here that lacks the global register variables feature which is so valuable to an interpreter).Which compiler are you using for this? Do you just run it from the CLI?
Not typically, no, because everything will relate back to the native C data types like char and int and only the compiler knows what their sizes are on any given platform and configuration.Can one tell from a header file what the length of different data-types (for a specific architecture) is & what the alignment rules are?
does anyone know if this is true, and if it is, can you suggest a solutionFNf4(1.0) returns integer &3F800000. BBCSDL32 pushes that 32-bit int on the stack. D3D11 reads it as a 32-bit float = 1.0. All good.
In BBCSDL64, FNf4(1.0) still returns integer &3F800000, but SYS passes all integers as 64-bit. So D3D11 gets 0x000000003F800000.
The x64 calling convention puts the 5th parameter Depth in the XMM3 register for floats. But because you passed an integer, BBCSDL64 puts 0x000000003F800000 in R9, not XMM3. D3D11 looks in XMM3 and finds 0.0 or garbage that reads as -0.0.
Rule: For COM SYS calls in 64-bit, if the parameter is FLOAT, DOUBLE, or any struct-by-value, you MUST pass a float variable, not an integer with the bits.
Fix line 3670
Don’t use FNf4 in the SYS. Use a real float variable:
What specific API function(s) are you referring to here? Certainly care must be taken when passing float parameters (that is scalar values, not arrays) to SYS calls; this is called out in the 'differences' document: "when running in 64-bits they must be passed as a single parameter, with special precautions in the event of the value being zero". There's example code in that document.
I honestly have no idea. It's not surprising that you can't mix your D3D11 graphics output with the OpenGL text output from BBCSDL, the two different 3D drivers probably can't coexist. I tend to fall back on displaying diagnostic information in the title bar, which I assume will work for you, but obviously the 'real estate' in the title bar is very limited.