On Thu, Sep 30, 2021 at 9:16 PM Nikolay Sivov nsivov@codeweavers.com wrote:
On 9/30/21 10:03 PM, Matteo Bruni wrote:
BlendState s_blendstate; -Texture s_texture; +Texture2D s_texture; PixelShader ps;
I'm curious if that change made any difference.
It has to match "shared" type I think. And I believe I had to change from "Texture", to get Load() call to compile. I have to admit, I don't understand what non-specific "Texture" type implies exactly. Does it mean I can use any texture type for it?
Probably? It's to be figured out. FWIW compiling the same shader without the Texture -> Texture2D change with fxc gives me
error X3087: texture object does not have methods
which means the generic Texture object can't be used as is. Maybe it can be if it's "specialized" (e.g. by redeclaring it as a specific texture type) in the parent shader or something?
+float4 PS( float4 pos : SV_POSITION ) : SV_Target +{
- return s_texture.Load(int3(0,0,0));
+}
+PixelShader vs = CompileShader(ps_4_0, PS());
Of course it doesn't matter but I'd rather not use "vs" for a pixel shader variable name...
Eh, of course.