Skip to main content
gamedev.net
🔒 Locked

Texture shaders

Started by Mezz Jan 3, 2005 at 11:04 AM 3 replies 1.3k views
Original Post
Mezz
Mezz
I was just looking through the DX9 (Dec. 2004) docs and came across the D3DX texture shader interface and associated functions. I know this might be a longshot or wishful thinking, but does anybody know if the HLSL texture shaders are executed on the GPU? or are they doomed to pre-processing usage because they're run on the CPU. Thanks for any info, -Mezz
Pipo DeClown
Pipo DeClown
Shaders probably run on the GPU or crash on the CPU. [grin]
chxfryer
chxfryer
depends on if you support vertex/pixel shaders in hardware. if you do, they run on the gpu. if not, they run on cpu.
::fart::
Mezz
Mezz
Well, the reason I ask is that there are D3DXTextureFill() functions which take C functions which are executed each pixel, and they're blatently not going to be executed on the GPU. It's only the D3DXTextureFillTX() function which takes a texture shader interface (it used to be just a compiled shader code pointer!) so I'm not sure if it's actually going to use the GPU, or if it's just a convenience method. The docs don't say anything about where it gets executed, which is annoying.

-Mezz
Muhammad Haggag
Muhammad Haggag
I seem to recall it always runs in software. However, the return value docs say:
Quote:
If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following:
D3DERR_NOTAVAILABLE - This device does not support the queried technique.
D3DERR_INVALIDCALL - The method call is invalid. For example, a method's parameter may have an invalid value.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.