wined3d: Place # of textures, addresses, & temps used inside the baseShader struct to prepare for GenerateShader merge.
This commit is contained in:
parent
653e71d774
commit
cc2ea9e08c
|
@ -96,9 +96,11 @@ const SHADER_OPCODE* shader_get_opcode(
|
|||
|
||||
void shader_get_registers_used(
|
||||
IWineD3DBaseShader *iface,
|
||||
CONST DWORD* pToken,
|
||||
DWORD* tempsUsed,
|
||||
DWORD* texUsed) {
|
||||
CONST DWORD* pToken) {
|
||||
|
||||
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
|
||||
DWORD* tempsUsed = &This->baseShader.temps_used;
|
||||
DWORD* texUsed = &This->baseShader.textures_used;
|
||||
|
||||
if (pToken == NULL)
|
||||
return;
|
||||
|
|
|
@ -1337,7 +1337,10 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha
|
|||
This->constants[i] = 0;
|
||||
|
||||
/* First pass: figure out which temporary and texture registers are used */
|
||||
shader_get_registers_used((IWineD3DBaseShader*) This, pToken, &tempsUsed, &texUsed);
|
||||
shader_get_registers_used((IWineD3DBaseShader*) This, pToken);
|
||||
texUsed = This->baseShader.textures_used;
|
||||
tempsUsed = This->baseShader.temps_used;
|
||||
|
||||
TRACE("Texture registers used: %#lx, Temp registers used %#lx\n", texUsed, tempsUsed);
|
||||
|
||||
/* TODO: check register usage against GL/Directx limits, and fail if they're exceeded */
|
||||
|
|
|
@ -1153,7 +1153,10 @@ inline static VOID IWineD3DVertexShaderImpl_GenerateProgramArbHW(IWineD3DVertexS
|
|||
buffer.lineNo = 0;
|
||||
|
||||
/* First pass: figure out which temporary and texture registers are used */
|
||||
shader_get_registers_used((IWineD3DBaseShader*) This, pToken, &tempsUsed, &addressUsed);
|
||||
shader_get_registers_used((IWineD3DBaseShader*) This, pToken);
|
||||
addressUsed = This->baseShader.textures_used;
|
||||
tempsUsed = This->baseShader.temps_used;
|
||||
|
||||
TRACE("Address registers used: %#lx, Temp registers used %#lx\n", addressUsed, tempsUsed);
|
||||
|
||||
/* TODO: check register usage against GL/Directx limits, and fail if they're exceeded
|
||||
|
|
|
@ -1260,6 +1260,8 @@ typedef struct IWineD3DBaseShaderClass
|
|||
{
|
||||
DWORD version;
|
||||
DWORD hex_version;
|
||||
DWORD temps_used;
|
||||
DWORD textures_used;
|
||||
SHADER_LIMITS limits;
|
||||
SHADER_PARSE_STATE parse_state;
|
||||
CONST SHADER_OPCODE *shader_ins;
|
||||
|
@ -1279,9 +1281,7 @@ typedef struct IWineD3DBaseShaderImpl {
|
|||
|
||||
extern void shader_get_registers_used(
|
||||
IWineD3DBaseShader *iface,
|
||||
CONST DWORD* pToken,
|
||||
DWORD* tempsUsed,
|
||||
DWORD* texUsed);
|
||||
CONST DWORD* pToken);
|
||||
|
||||
extern void shader_program_dump_decl_usage(
|
||||
DWORD dcl,
|
||||
|
|
Loading…
Reference in New Issue