Commit cc2ea9e0 authored by Jason Green's avatar Jason Green Committed by Alexandre Julliard

wined3d: Place # of textures, addresses, & temps used inside the baseShader…

wined3d: Place # of textures, addresses, & temps used inside the baseShader struct to prepare for GenerateShader merge.
parent 653e71d7
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment