mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
remove white space commit. for those file are 100% share with wine.
svn path=/trunk/; revision=30390
This commit is contained in:
parent
28ad3034a2
commit
8807a0dd76
19 changed files with 183 additions and 183 deletions
|
@ -41,10 +41,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_constants);
|
|||
* ARB_[vertex/fragment]_program helper functions follow
|
||||
********************************************************/
|
||||
|
||||
/**
|
||||
/**
|
||||
* Loads floating point constants into the currently set ARB_vertex/fragment_program.
|
||||
* When constant_list == NULL, it will load all the constants.
|
||||
*
|
||||
*
|
||||
* @target_type should be either GL_VERTEX_PROGRAM_ARB (for vertex shaders)
|
||||
* or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders)
|
||||
*/
|
||||
|
@ -93,16 +93,16 @@ static void shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_
|
|||
|
||||
/**
|
||||
* Loads the app-supplied constants into the currently set ARB_[vertex/fragment]_programs.
|
||||
*
|
||||
* We only support float constants in ARB at the moment, so don't
|
||||
*
|
||||
* We only support float constants in ARB at the moment, so don't
|
||||
* worry about the Integers or Booleans
|
||||
*/
|
||||
void shader_arb_load_constants(
|
||||
IWineD3DDevice* device,
|
||||
char usePixelShader,
|
||||
char useVertexShader) {
|
||||
|
||||
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
|
||||
|
||||
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
|
||||
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
|
||||
WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
|
||||
|
||||
|
@ -124,7 +124,7 @@ void shader_arb_load_constants(
|
|||
IWineD3DBaseShaderImpl* pshader = (IWineD3DBaseShaderImpl*) stateBlock->pixelShader;
|
||||
|
||||
/* Load DirectX 9 float constants for pixel shader */
|
||||
shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
GL_LIMITS(pshader_constantsF),
|
||||
stateBlock->pixelShaderConstantF,
|
||||
&stateBlock->set_pconstantsF);
|
||||
|
@ -150,7 +150,7 @@ void shader_generate_arb_declarations(
|
|||
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
|
||||
DWORD i;
|
||||
char pshader = shader_is_pshader_version(This->baseShader.hex_version);
|
||||
unsigned max_constantsF = min(This->baseShader.limits.constant_float,
|
||||
unsigned max_constantsF = min(This->baseShader.limits.constant_float,
|
||||
(pshader ? GL_LIMITS(pshader_constantsF) : GL_LIMITS(vshader_constantsF)));
|
||||
|
||||
/* Temporary Output register */
|
||||
|
|
|
@ -37,7 +37,7 @@ static inline BOOL shader_is_version_token(DWORD token) {
|
|||
}
|
||||
|
||||
int shader_addline(
|
||||
SHADER_BUFFER* buffer,
|
||||
SHADER_BUFFER* buffer,
|
||||
const char *format, ...) {
|
||||
|
||||
char* base = buffer->buffer + buffer->bsize;
|
||||
|
@ -48,7 +48,7 @@ int shader_addline(
|
|||
rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
|
||||
va_end(args);
|
||||
|
||||
if (rc < 0 || /* C89 */
|
||||
if (rc < 0 || /* C89 */
|
||||
rc > SHADER_PGMSIZE - 1 - buffer->bsize) { /* C99 */
|
||||
|
||||
ERR("The buffer allocated for the shader program string "
|
||||
|
@ -90,7 +90,7 @@ const SHADER_OPCODE* shader_get_opcode(
|
|||
}
|
||||
++i;
|
||||
}
|
||||
FIXME("Unsupported opcode %#x(%d) masked %#x, shader version %#x\n",
|
||||
FIXME("Unsupported opcode %#x(%d) masked %#x, shader version %#x\n",
|
||||
code, code, code & WINED3DSI_OPCODE_MASK, hex_version);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -133,10 +133,10 @@ static inline int shader_skip_opcode(
|
|||
}
|
||||
|
||||
/* Read the parameters of an unrecognized opcode from the input stream
|
||||
* Return the number of tokens read.
|
||||
*
|
||||
* Return the number of tokens read.
|
||||
*
|
||||
* Note: This function assumes source or destination token format.
|
||||
* It will not work with specially-formatted tokens like DEF or DCL,
|
||||
* It will not work with specially-formatted tokens like DEF or DCL,
|
||||
* but hopefully those would be recognized */
|
||||
|
||||
int shader_skip_unrecognized(
|
||||
|
@ -292,11 +292,11 @@ HRESULT shader_get_registers_used(
|
|||
WINED3DSIO_REP == curOpcode->opcode) {
|
||||
reg_maps->loop = 1;
|
||||
pToken += curOpcode->num_params;
|
||||
|
||||
|
||||
/* For subroutine prototypes */
|
||||
} else if (WINED3DSIO_LABEL == curOpcode->opcode) {
|
||||
|
||||
DWORD snum = *pToken & WINED3DSP_REGNUM_MASK;
|
||||
DWORD snum = *pToken & WINED3DSP_REGNUM_MASK;
|
||||
reg_maps->labels[snum] = 1;
|
||||
pToken += curOpcode->num_params;
|
||||
|
||||
|
@ -313,7 +313,7 @@ HRESULT shader_get_registers_used(
|
|||
int i, limit;
|
||||
|
||||
/* Declare 1.X samplers implicitly, based on the destination reg. number */
|
||||
if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
|
||||
if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) == 1 &&
|
||||
(WINED3DSIO_TEX == curOpcode->opcode ||
|
||||
WINED3DSIO_TEXBEM == curOpcode->opcode ||
|
||||
WINED3DSIO_TEXBEML == curOpcode->opcode ||
|
||||
|
@ -364,10 +364,10 @@ HRESULT shader_get_registers_used(
|
|||
}
|
||||
|
||||
/* This will loop over all the registers and try to
|
||||
* make a bitmask of the ones we're interested in.
|
||||
* make a bitmask of the ones we're interested in.
|
||||
*
|
||||
* Relative addressing tokens are ignored, but that's
|
||||
* okay, since we'll catch any address registers when
|
||||
* Relative addressing tokens are ignored, but that's
|
||||
* okay, since we'll catch any address registers when
|
||||
* they are initialized (required by spec) */
|
||||
|
||||
limit = (opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED)?
|
||||
|
@ -406,7 +406,7 @@ HRESULT shader_get_registers_used(
|
|||
|
||||
static void shader_dump_decl_usage(
|
||||
IWineD3DBaseShaderImpl* This,
|
||||
DWORD decl,
|
||||
DWORD decl,
|
||||
DWORD param) {
|
||||
|
||||
DWORD regtype = shader_get_regtype(param);
|
||||
|
@ -420,10 +420,10 @@ static void shader_dump_decl_usage(
|
|||
case WINED3DSTT_2D: TRACE("_2d"); break;
|
||||
case WINED3DSTT_CUBE: TRACE("_cube"); break;
|
||||
case WINED3DSTT_VOLUME: TRACE("_volume"); break;
|
||||
default: TRACE("_unknown_ttype(%08x)", ttype);
|
||||
default: TRACE("_unknown_ttype(%08x)", ttype);
|
||||
}
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
DWORD usage = decl & WINED3DSP_DCL_USAGE_MASK;
|
||||
DWORD idx = (decl & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
|
||||
|
@ -513,7 +513,7 @@ static void shader_dump_arr_entry(
|
|||
|
||||
void shader_dump_param(
|
||||
IWineD3DBaseShader *iface,
|
||||
const DWORD param,
|
||||
const DWORD param,
|
||||
const DWORD addr_token,
|
||||
int input) {
|
||||
|
||||
|
@ -549,7 +549,7 @@ void shader_dump_param(
|
|||
else if (modifier == WINED3DSPSM_NOT)
|
||||
TRACE("!");
|
||||
|
||||
if (modifier == WINED3DSPSM_ABS || modifier == WINED3DSPSM_ABSNEG)
|
||||
if (modifier == WINED3DSPSM_ABS || modifier == WINED3DSPSM_ABSNEG)
|
||||
TRACE("abs(");
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ void shader_dump_param(
|
|||
break;
|
||||
case WINED3DSPR_TEXTURE: /* vs: case D3DSPR_ADDR */
|
||||
TRACE("%c%u", (pshader? 't':'a'), reg);
|
||||
break;
|
||||
break;
|
||||
case WINED3DSPR_RASTOUT:
|
||||
TRACE("%s", rastout_reg_names[reg]);
|
||||
break;
|
||||
|
@ -583,7 +583,7 @@ void shader_dump_param(
|
|||
case WINED3DSPR_ATTROUT:
|
||||
TRACE("oD%u", reg);
|
||||
break;
|
||||
case WINED3DSPR_TEXCRDOUT:
|
||||
case WINED3DSPR_TEXCRDOUT:
|
||||
|
||||
/* Vertex shaders >= 3.0 use general purpose output registers
|
||||
* (WINED3DSPR_OUTPUT), which can include an address token */
|
||||
|
@ -592,7 +592,7 @@ void shader_dump_param(
|
|||
TRACE("o");
|
||||
shader_dump_arr_entry(iface, param, addr_token, reg, input);
|
||||
}
|
||||
else
|
||||
else
|
||||
TRACE("oT%u", reg);
|
||||
break;
|
||||
case WINED3DSPR_CONSTINT:
|
||||
|
@ -745,7 +745,7 @@ void shader_generate_main(
|
|||
/* Unknown opcode and its parameters */
|
||||
if (NULL == curOpcode) {
|
||||
FIXME("Unrecognized opcode: token=%08x\n", hw_arg.opcode_token);
|
||||
pToken += shader_skip_unrecognized(iface, pToken);
|
||||
pToken += shader_skip_unrecognized(iface, pToken);
|
||||
|
||||
/* Nothing to do */
|
||||
} else if (WINED3DSIO_DCL == curOpcode->opcode ||
|
||||
|
@ -773,13 +773,13 @@ void shader_generate_main(
|
|||
}
|
||||
|
||||
/* Predication token */
|
||||
if (hw_arg.opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED)
|
||||
if (hw_arg.opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED)
|
||||
hw_arg.predicate = *pToken++;
|
||||
|
||||
/* Other source tokens */
|
||||
for (i = 0; i < (curOpcode->num_params - curOpcode->dst_token); i++) {
|
||||
|
||||
DWORD param, addr_token = 0;
|
||||
DWORD param, addr_token = 0;
|
||||
pToken += shader_get_param(iface, pToken, ¶m, &addr_token);
|
||||
hw_arg.src[i] = param;
|
||||
hw_arg.src_addr[i] = addr_token;
|
||||
|
|
|
@ -259,7 +259,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
|
|||
glTexParameteri(textureDimensions, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else { /* this only happened if we've run out of openGL textures */
|
||||
WARN("This texture doesn't have an openGL texture assigned to it\n");
|
||||
hr = WINED3DERR_INVALIDCALL;
|
||||
|
|
|
@ -227,8 +227,8 @@ static UINT WINAPI IWineD3DCubeTextureImpl_GetTextureDimensions(IWineD3DCubeText
|
|||
return GL_TEXTURE_CUBE_MAP_ARB;
|
||||
}
|
||||
|
||||
static void WINAPI IWineD3DCubeTextureImpl_ApplyStateChanges(IWineD3DCubeTexture *iface,
|
||||
const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1],
|
||||
static void WINAPI IWineD3DCubeTextureImpl_ApplyStateChanges(IWineD3DCubeTexture *iface,
|
||||
const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1],
|
||||
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) {
|
||||
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
|
||||
float matrix[16];
|
||||
|
|
|
@ -290,7 +290,7 @@ static void CreateVBO(IWineD3DVertexBufferImpl *object) {
|
|||
return;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage,
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage,
|
||||
DWORD FVF, WINED3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle,
|
||||
IUnknown *parent) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
|
@ -331,7 +331,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
|
|||
* more. In this call we can convert dx7 buffers too.
|
||||
*/
|
||||
conv = ((FVF & WINED3DFVF_POSITION_MASK) == WINED3DFVF_XYZRHW ) || (FVF & (WINED3DFVF_DIFFUSE | WINED3DFVF_SPECULAR));
|
||||
if( GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) && Pool != WINED3DPOOL_SYSTEMMEM && !(Usage & WINED3DUSAGE_DYNAMIC) &&
|
||||
if( GL_SUPPORT(ARB_VERTEX_BUFFER_OBJECT) && Pool != WINED3DPOOL_SYSTEMMEM && !(Usage & WINED3DUSAGE_DYNAMIC) &&
|
||||
(dxVersion > 7 || !conv) ) {
|
||||
CreateVBO(object);
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ out:
|
|||
object->vbo = 0;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage,
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage,
|
||||
WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer,
|
||||
HANDLE *sharedHandle, IUnknown *parent) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
|
@ -406,7 +406,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
|
|||
CreateIndexBufferVBO(This, object);
|
||||
}
|
||||
|
||||
TRACE("(%p) : Len=%d, Use=%x, Format=(%u,%s), Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage, Format,
|
||||
TRACE("(%p) : Len=%d, Use=%x, Format=(%u,%s), Pool=%d - Memory@%p, Iface@%p\n", This, Length, Usage, Format,
|
||||
debug_d3dformat(Format), Pool, object, object->resource.allocatedMemory);
|
||||
*ppIndexBuffer = (IWineD3DIndexBuffer *) object;
|
||||
|
||||
|
@ -434,7 +434,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface,
|
|||
be freed due to circular dependencies */
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
|
||||
temp_result = allocate_shader_constants(object);
|
||||
if (WINED3D_OK != temp_result)
|
||||
return temp_result;
|
||||
|
@ -625,24 +625,24 @@ MSDN:
|
|||
[in] Render targets are not lockable unless the application specifies TRUE for Lockable. Note that lockable render targets reduce performance on some graphics hardware.
|
||||
|
||||
Discard
|
||||
[in] Set this flag to TRUE to enable z-buffer discarding, and FALSE otherwise.
|
||||
[in] Set this flag to TRUE to enable z-buffer discarding, and FALSE otherwise.
|
||||
|
||||
If this flag is set, the contents of the depth stencil buffer will be invalid after calling either IDirect3DDevice9::Present or IDirect3DDevice9::SetDepthStencilSurface with a different depth surface.
|
||||
|
||||
******************************** */
|
||||
|
||||
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, WINED3DSURFTYPE Impl, IUnknown *parent) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */
|
||||
unsigned int Size = 1;
|
||||
const StaticPixelFormatDesc *tableEntry = getFormatDescEntry(Format, NULL, NULL);
|
||||
TRACE("(%p) Create surface\n",This);
|
||||
|
||||
/** FIXME: Check ranges on the inputs are valid
|
||||
|
||||
/** FIXME: Check ranges on the inputs are valid
|
||||
* MSDN
|
||||
* MultisampleQuality
|
||||
* [in] Quality level. The valid range is between zero and one less than the level
|
||||
* returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType.
|
||||
* returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType.
|
||||
* Passing a larger value returns the error WINED3DERR_INVALIDCALL. The MultisampleQuality
|
||||
* values of paired render targets, depth stencil surfaces, and the MultiSample type
|
||||
* must all match.
|
||||
|
@ -813,7 +813,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
|
|||
TRACE("Format %#x (%s), Pool %#x, ppTexture %p, pSharedHandle %p, parent %p\n",
|
||||
Format, debug_d3dformat(Format), Pool, ppTexture, pSharedHandle, parent);
|
||||
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
that are reported as supported */
|
||||
if (WINED3DFMT_UNKNOWN >= Format) {
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN\n", This);
|
||||
|
@ -821,7 +821,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
|
|||
}
|
||||
|
||||
D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, WINED3DRTYPE_TEXTURE, 0);
|
||||
D3DINITIALIZEBASETEXTURE(object->baseTexture);
|
||||
D3DINITIALIZEBASETEXTURE(object->baseTexture);
|
||||
object->width = Width;
|
||||
object->height = Height;
|
||||
|
||||
|
@ -899,7 +899,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
|
|||
UINT tmpH;
|
||||
UINT tmpD;
|
||||
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
that are reported as supported */
|
||||
if (WINED3DFMT_UNKNOWN >= Format) {
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN\n", This);
|
||||
|
@ -1008,7 +1008,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
|
|||
HRESULT hr;
|
||||
unsigned int pow2EdgeLength = EdgeLength;
|
||||
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
/* TODO: It should only be possible to create textures for formats
|
||||
that are reported as supported */
|
||||
if (WINED3DFMT_UNKNOWN >= Format) {
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN\n", This);
|
||||
|
@ -1776,7 +1776,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
|
|||
object->parent = Parent;
|
||||
object->wineD3DDevice = This;
|
||||
object->palNumEntries = IWineD3DPaletteImpl_Size(Flags);
|
||||
|
||||
|
||||
object->hpal = CreatePalette((const LOGPALETTE*)&(object->palVersion));
|
||||
|
||||
if(!object->hpal) {
|
||||
|
@ -3792,7 +3792,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
|
||||
if( !doClip ||
|
||||
( (-rhw -eps < x) && (-rhw -eps < y) && ( -eps < z) &&
|
||||
(x <= rhw + eps) && (y <= rhw + eps ) && (z <= rhw + eps) &&
|
||||
(x <= rhw + eps) && (y <= rhw + eps ) && (z <= rhw + eps) &&
|
||||
( rhw > eps ) ) ) {
|
||||
|
||||
/* "Normal" viewport transformation (not clipped)
|
||||
|
@ -3887,7 +3887,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
}
|
||||
|
||||
if (DestFVF & WINED3DFVF_DIFFUSE) {
|
||||
DWORD *color_d =
|
||||
DWORD *color_d =
|
||||
(DWORD *) (((char *) lpStrideData->u.s.diffuse.lpData) + i * lpStrideData->u.s.diffuse.dwStride);
|
||||
if(!color_d) {
|
||||
static BOOL warned = FALSE;
|
||||
|
@ -3916,9 +3916,9 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
}
|
||||
}
|
||||
|
||||
if (DestFVF & WINED3DFVF_SPECULAR) {
|
||||
if (DestFVF & WINED3DFVF_SPECULAR) {
|
||||
/* What's the color value in the feedback buffer? */
|
||||
DWORD *color_s =
|
||||
DWORD *color_s =
|
||||
(DWORD *) (((char *) lpStrideData->u.s.specular.lpData) + i * lpStrideData->u.s.specular.dwStride);
|
||||
if(!color_s) {
|
||||
static BOOL warned = FALSE;
|
||||
|
@ -3949,7 +3949,7 @@ process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCo
|
|||
|
||||
for (tex_index = 0; tex_index < numTextures; tex_index++) {
|
||||
float *tex_coord =
|
||||
(float *) (((char *) lpStrideData->u.s.texCoords[tex_index].lpData) +
|
||||
(float *) (((char *) lpStrideData->u.s.texCoords[tex_index].lpData) +
|
||||
i * lpStrideData->u.s.texCoords[tex_index].dwStride);
|
||||
if(!tex_coord) {
|
||||
ERR("No source texture, but destination requests one\n");
|
||||
|
@ -4153,7 +4153,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
|
|||
oldTexture = This->updateStateBlock->textures[Stage];
|
||||
|
||||
if(pTexture != NULL) {
|
||||
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH;
|
||||
/* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH;
|
||||
*/
|
||||
if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH) {
|
||||
WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
|
||||
|
@ -4345,11 +4345,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_BeginStateBlock(IWineD3DDevice *iface)
|
|||
int i;
|
||||
|
||||
ERR("(%p)\n", This);
|
||||
|
||||
|
||||
if (This->isRecordingState) {
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
|
||||
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DStateBlockImpl));
|
||||
if (NULL == object ) {
|
||||
FIXME("(%p)Error allocating memory for stateblock\n", This);
|
||||
|
@ -6522,7 +6522,7 @@ static void WINAPI IWineD3DDeviceImpl_RemoveResource(IWineD3DDevice *iface, IWin
|
|||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
ResourceList* resourceList = NULL;
|
||||
ResourceList* previousResourceList = NULL;
|
||||
|
||||
|
||||
TRACE("(%p) : resource %p\n", This, resource);
|
||||
|
||||
resourceList = This->resources;
|
||||
|
|
|
@ -453,7 +453,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
|
|||
gl_info->gl_vendor = VENDOR_NVIDIA;
|
||||
} else if (strstr(gl_string, "ATI")) {
|
||||
gl_info->gl_vendor = VENDOR_ATI;
|
||||
} else if (strstr(gl_string, "Intel(R)") ||
|
||||
} else if (strstr(gl_string, "Intel(R)") ||
|
||||
strstr(gl_info->gl_renderer, "Intel(R)")) {
|
||||
gl_info->gl_vendor = VENDOR_INTEL;
|
||||
} else if (strstr(gl_string, "Mesa")) {
|
||||
|
@ -842,7 +842,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
|
|||
* without a full database we can return a card with similar features. Second the size of the database
|
||||
* can be made quite small because when you know what type of 3d functionality a card has, you know to which
|
||||
* GPU family the GPU must belong. Because of this you only have to check a small part of the renderer string
|
||||
* to distinguishes between different models from that family.
|
||||
* to distinguishes between different models from that family.
|
||||
*/
|
||||
switch (gl_info->gl_vendor) {
|
||||
case VENDOR_NVIDIA:
|
||||
|
@ -914,7 +914,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
|
|||
strstr(gl_info->gl_renderer, "X1300") ||
|
||||
strstr(gl_info->gl_renderer, "X1400"))
|
||||
gl_info->gl_card = CARD_ATI_RADEON_X700;
|
||||
/* Radeon R3xx */
|
||||
/* Radeon R3xx */
|
||||
else
|
||||
gl_info->gl_card = CARD_ATI_RADEON_9500; /* Radeon 9500/9550/9600/9700/9800/X300/X550/X600 */
|
||||
} else if(WINE_D3D8_CAPABLE(gl_info)) {
|
||||
|
@ -942,7 +942,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
|
|||
case VENDOR_MESA:
|
||||
case VENDOR_WINE:
|
||||
default:
|
||||
/* Default to generic Nvidia hardware based on the supported OpenGL extensions. The choice
|
||||
/* Default to generic Nvidia hardware based on the supported OpenGL extensions. The choice
|
||||
* for Nvidia was because the hardware and drivers they make are of good quality. This makes
|
||||
* them a good generic choice.
|
||||
*/
|
||||
|
@ -950,7 +950,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
|
|||
if(WINE_D3D9_CAPABLE(gl_info))
|
||||
gl_info->gl_card = CARD_NVIDIA_GEFORCEFX_5600;
|
||||
else if(WINE_D3D8_CAPABLE(gl_info))
|
||||
gl_info->gl_card = CARD_NVIDIA_GEFORCE3;
|
||||
gl_info->gl_card = CARD_NVIDIA_GEFORCE3;
|
||||
else if(WINE_D3D7_CAPABLE(gl_info))
|
||||
gl_info->gl_card = CARD_NVIDIA_GEFORCE;
|
||||
else if(WINE_D3D6_CAPABLE(gl_info))
|
||||
|
@ -1403,7 +1403,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT
|
|||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
WINED3DFORMAT SurfaceFormat,
|
||||
BOOL Windowed, WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
|
||||
|
||||
|
@ -1477,7 +1477,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
|
|||
}
|
||||
|
||||
#define GLINFO_LOCATION Adapters[Adapter].gl_info
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) {
|
||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%u,%s,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s))\n",
|
||||
|
@ -2189,7 +2189,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
WINED3DVTXPCAPS_LOCALVIEWER |
|
||||
WINED3DVTXPCAPS_VERTEXFOG |
|
||||
WINED3DVTXPCAPS_TEXGEN;
|
||||
/* FIXME: Add
|
||||
/* FIXME: Add
|
||||
D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */
|
||||
|
||||
*pCaps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */
|
||||
|
@ -2271,13 +2271,13 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
|
||||
*pCaps->NumSimultaneousRTs = GL_LIMITS(buffers);
|
||||
|
||||
|
||||
|
||||
*pCaps->StretchRectFilterCaps = WINED3DPTFILTERCAPS_MINFPOINT |
|
||||
WINED3DPTFILTERCAPS_MAGFPOINT |
|
||||
WINED3DPTFILTERCAPS_MINFLINEAR |
|
||||
WINED3DPTFILTERCAPS_MAGFLINEAR;
|
||||
*pCaps->VertexTextureFilterCaps = 0;
|
||||
|
||||
|
||||
if(*pCaps->VertexShaderVersion == WINED3DVS_VERSION(3,0)) {
|
||||
/* Where possible set the caps based on OpenGL extensions and if they aren't set (in case of software rendering)
|
||||
use the VS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum VS3.0 value. */
|
||||
|
@ -2292,7 +2292,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
*pCaps->VS20Caps.Caps = 0;
|
||||
*pCaps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH;
|
||||
*pCaps->VS20Caps.NumTemps = max(12, GLINFO_LOCATION.vs_arb_max_temps);
|
||||
*pCaps->VS20Caps.StaticFlowControlDepth = 1;
|
||||
*pCaps->VS20Caps.StaticFlowControlDepth = 1;
|
||||
|
||||
*pCaps->MaxVShaderInstructionsExecuted = 65535;
|
||||
*pCaps->MaxVertexShader30InstructionSlots = 0;
|
||||
|
@ -2300,16 +2300,16 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
*pCaps->VS20Caps.Caps = 0;
|
||||
*pCaps->VS20Caps.DynamicFlowControlDepth = 0;
|
||||
*pCaps->VS20Caps.NumTemps = 0;
|
||||
*pCaps->VS20Caps.StaticFlowControlDepth = 0;
|
||||
*pCaps->VS20Caps.StaticFlowControlDepth = 0;
|
||||
|
||||
*pCaps->MaxVShaderInstructionsExecuted = 0;
|
||||
*pCaps->MaxVertexShader30InstructionSlots = 0;
|
||||
*pCaps->MaxVertexShader30InstructionSlots = 0;
|
||||
}
|
||||
|
||||
if(*pCaps->PixelShaderVersion == WINED3DPS_VERSION(3,0)) {
|
||||
/* Where possible set the caps based on OpenGL extensions and if they aren't set (in case of software rendering)
|
||||
use the PS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum PS 3.0 value. */
|
||||
|
||||
|
||||
/* Caps is more or less undocumented on MSDN but it appears to be used for PS20Caps based on results from R9600/FX5900/Geforce6800 cards from Windows */
|
||||
*pCaps->PS20Caps.Caps = WINED3DPS20CAPS_ARBITRARYSWIZZLE |
|
||||
WINED3DPS20CAPS_GRADIENTINSTRUCTIONS |
|
||||
|
|
|
@ -493,7 +493,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
|
|||
D3DCOLOR_B_G(diffuseColor),
|
||||
D3DCOLOR_B_B(diffuseColor),
|
||||
D3DCOLOR_B_A(diffuseColor));
|
||||
VTRACE(("glColor4ub: r,g,b,a=%lu,%lu,%lu,%lu\n",
|
||||
VTRACE(("glColor4ub: r,g,b,a=%lu,%lu,%lu,%lu\n",
|
||||
D3DCOLOR_B_R(diffuseColor),
|
||||
D3DCOLOR_B_G(diffuseColor),
|
||||
D3DCOLOR_B_B(diffuseColor),
|
||||
|
@ -535,9 +535,9 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
|
|||
}
|
||||
}
|
||||
|
||||
VTRACE(("glSecondaryColor4ub: r,g,b=%lu,%lu,%lu\n",
|
||||
D3DCOLOR_B_R(specularColor),
|
||||
D3DCOLOR_B_G(specularColor),
|
||||
VTRACE(("glSecondaryColor4ub: r,g,b=%lu,%lu,%lu\n",
|
||||
D3DCOLOR_B_R(specularColor),
|
||||
D3DCOLOR_B_G(specularColor),
|
||||
D3DCOLOR_B_B(specularColor)));
|
||||
if (GL_SUPPORT(EXT_SECONDARY_COLOR)) {
|
||||
GL_EXTCALL(glSecondaryColor3ubEXT)(
|
||||
|
@ -1110,7 +1110,7 @@ if(stridedlcl.u.s.type.VBO) { \
|
|||
#ifdef SHOW_FRAME_MAKEUP
|
||||
{
|
||||
static long int primCounter = 0;
|
||||
/* NOTE: set primCounter to the value reported by drawprim
|
||||
/* NOTE: set primCounter to the value reported by drawprim
|
||||
before you want to to write frame makeup to /tmp */
|
||||
if (primCounter >= 0) {
|
||||
WINED3DLOCKED_RECT r;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* GLSL pixel and vertex shader implementation
|
||||
*
|
||||
* Copyright 2006 Jason Green
|
||||
* Copyright 2006 Jason Green
|
||||
* Copyright 2006-2007 Henri Verbeet
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -53,7 +53,7 @@ typedef struct {
|
|||
|
||||
/** Prints the GLSL info log which will contain error messages if they exist */
|
||||
void print_glsl_info_log(WineD3D_GL_Info *gl_info, GLhandleARB obj) {
|
||||
|
||||
|
||||
int infologLength = 0;
|
||||
char *infoLog;
|
||||
|
||||
|
@ -124,7 +124,7 @@ static void shader_glsl_load_vsamplers(WineD3D_GL_Info *gl_info, IWineD3DStateBl
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Loads floating point constants (aka uniforms) into the currently set GLSL program.
|
||||
* When constant_list == NULL, it will load all the constants.
|
||||
*/
|
||||
|
@ -187,7 +187,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL
|
|||
checkGLcall("glUniform4fvARB()");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Loads integer constants (aka uniforms) into the currently set GLSL program.
|
||||
* When @constants_set == NULL, it will load all the constants.
|
||||
*/
|
||||
|
@ -198,7 +198,7 @@ static void shader_glsl_load_constantsI(
|
|||
unsigned max_constants,
|
||||
int* constants,
|
||||
BOOL* constants_set) {
|
||||
|
||||
|
||||
GLhandleARB tmp_loc;
|
||||
int i;
|
||||
char tmp_name[8];
|
||||
|
@ -212,7 +212,7 @@ static void shader_glsl_load_constantsI(
|
|||
TRACE_(d3d_constants)("Loading constants %i: %i, %i, %i, %i\n",
|
||||
i, constants[i*4], constants[i*4+1], constants[i*4+2], constants[i*4+3]);
|
||||
|
||||
/* TODO: Benchmark and see if it would be beneficial to store the
|
||||
/* TODO: Benchmark and see if it would be beneficial to store the
|
||||
* locations of the constants to avoid looking up each time */
|
||||
_snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, i);
|
||||
tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name));
|
||||
|
@ -245,7 +245,7 @@ static void shader_glsl_load_constantsI(
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Loads boolean constants (aka uniforms) into the currently set GLSL program.
|
||||
* When @constants_set == NULL, it will load all the constants.
|
||||
*/
|
||||
|
@ -256,7 +256,7 @@ static void shader_glsl_load_constantsB(
|
|||
unsigned max_constants,
|
||||
BOOL* constants,
|
||||
BOOL* constants_set) {
|
||||
|
||||
|
||||
GLhandleARB tmp_loc;
|
||||
int i;
|
||||
char tmp_name[8];
|
||||
|
@ -269,7 +269,7 @@ static void shader_glsl_load_constantsB(
|
|||
|
||||
TRACE_(d3d_constants)("Loading constants %i: %i;\n", i, constants[i*4]);
|
||||
|
||||
/* TODO: Benchmark and see if it would be beneficial to store the
|
||||
/* TODO: Benchmark and see if it would be beneficial to store the
|
||||
* locations of the constants to avoid looking up each time */
|
||||
_snprintf(tmp_name, sizeof(tmp_name), "%s[%i]", prefix, i);
|
||||
tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name));
|
||||
|
@ -310,7 +310,7 @@ void shader_glsl_load_constants(
|
|||
IWineD3DDevice* device,
|
||||
char usePixelShader,
|
||||
char useVertexShader) {
|
||||
|
||||
|
||||
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
|
||||
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
|
||||
WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
|
||||
|
@ -373,12 +373,12 @@ void shader_glsl_load_constants(
|
|||
|
||||
/* Load DirectX 9 integer constants/uniforms for pixel shader */
|
||||
shader_glsl_load_constantsI(pshader, gl_info, programId, MAX_CONST_I,
|
||||
stateBlock->pixelShaderConstantI,
|
||||
stateBlock->pixelShaderConstantI,
|
||||
stateBlock->changed.pixelShaderConstantsI);
|
||||
|
||||
/* Load DirectX 9 boolean constants/uniforms for pixel shader */
|
||||
shader_glsl_load_constantsB(pshader, gl_info, programId, MAX_CONST_B,
|
||||
stateBlock->pixelShaderConstantB,
|
||||
stateBlock->pixelShaderConstantB,
|
||||
stateBlock->changed.pixelShaderConstantsB);
|
||||
|
||||
/* Upload the environment bump map matrix if needed. The needsbumpmat member specifies the texture stage to load the matrix from.
|
||||
|
@ -416,7 +416,7 @@ void shader_generate_glsl_declarations(
|
|||
|
||||
/* Declare the constants (aka uniforms) */
|
||||
if (This->baseShader.limits.constant_float > 0) {
|
||||
unsigned max_constantsF = min(This->baseShader.limits.constant_float,
|
||||
unsigned max_constantsF = min(This->baseShader.limits.constant_float,
|
||||
(pshader ? GL_LIMITS(pshader_constantsF) : GL_LIMITS(vshader_constantsF)));
|
||||
shader_addline(buffer, "uniform vec4 %cC[%u];\n", prefix, max_constantsF);
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ void shader_generate_glsl_declarations(
|
|||
else if(reg_maps->bumpmat != -1)
|
||||
shader_addline(buffer, "uniform mat2 bumpenvmat;\n");
|
||||
|
||||
/* Declare texture samplers */
|
||||
/* Declare texture samplers */
|
||||
for (i = 0; i < This->baseShader.limits.sampler; i++) {
|
||||
if (reg_maps->samplers[i]) {
|
||||
|
||||
|
@ -458,7 +458,7 @@ void shader_generate_glsl_declarations(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Declare address variables */
|
||||
for (i = 0; i < This->baseShader.limits.address; i++) {
|
||||
if (reg_maps->address[i])
|
||||
|
@ -467,7 +467,7 @@ void shader_generate_glsl_declarations(
|
|||
|
||||
/* Declare texture coordinate temporaries and initialize them */
|
||||
for (i = 0; i < This->baseShader.limits.texcoord; i++) {
|
||||
if (reg_maps->texcoord[i])
|
||||
if (reg_maps->texcoord[i])
|
||||
shader_addline(buffer, "vec4 T%lu = gl_TexCoord[%lu];\n", i, i);
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ void shader_generate_glsl_declarations(
|
|||
shader_addline(buffer, "int aL;\n");
|
||||
shader_addline(buffer, "int tmpInt;\n");
|
||||
}
|
||||
|
||||
|
||||
/* Temporary variables for matrix operations */
|
||||
shader_addline(buffer, "vec4 tmp0;\n");
|
||||
shader_addline(buffer, "vec4 tmp1;\n");
|
||||
|
@ -521,22 +521,22 @@ static void shader_glsl_add_src_param(SHADER_OPCODE_ARG* arg, const DWORD param,
|
|||
|
||||
/** Used for opcode modifiers - They multiply the result by the specified amount */
|
||||
static const char * const shift_glsl_tab[] = {
|
||||
"", /* 0 (none) */
|
||||
"2.0 * ", /* 1 (x2) */
|
||||
"4.0 * ", /* 2 (x4) */
|
||||
"8.0 * ", /* 3 (x8) */
|
||||
"16.0 * ", /* 4 (x16) */
|
||||
"32.0 * ", /* 5 (x32) */
|
||||
"", /* 6 (x64) */
|
||||
"", /* 7 (x128) */
|
||||
"", /* 8 (d256) */
|
||||
"", /* 9 (d128) */
|
||||
"", /* 10 (d64) */
|
||||
"", /* 11 (d32) */
|
||||
"0.0625 * ", /* 12 (d16) */
|
||||
"0.125 * ", /* 13 (d8) */
|
||||
"0.25 * ", /* 14 (d4) */
|
||||
"0.5 * " /* 15 (d2) */
|
||||
"", /* 0 (none) */
|
||||
"2.0 * ", /* 1 (x2) */
|
||||
"4.0 * ", /* 2 (x4) */
|
||||
"8.0 * ", /* 3 (x8) */
|
||||
"16.0 * ", /* 4 (x16) */
|
||||
"32.0 * ", /* 5 (x32) */
|
||||
"", /* 6 (x64) */
|
||||
"", /* 7 (x128) */
|
||||
"", /* 8 (d256) */
|
||||
"", /* 9 (d128) */
|
||||
"", /* 10 (d64) */
|
||||
"", /* 11 (d32) */
|
||||
"0.0625 * ", /* 12 (d16) */
|
||||
"0.125 * ", /* 13 (d8) */
|
||||
"0.25 * ", /* 14 (d4) */
|
||||
"0.5 * " /* 15 (d2) */
|
||||
};
|
||||
|
||||
/* Generate a GLSL parameter that does the input modifier computation and return the input register/mask to use */
|
||||
|
@ -547,7 +547,7 @@ static void shader_glsl_gen_modifier (
|
|||
char *out_str) {
|
||||
|
||||
out_str[0] = 0;
|
||||
|
||||
|
||||
if (instr == WINED3DSIO_TEXKILL)
|
||||
return;
|
||||
|
||||
|
@ -617,8 +617,8 @@ static void shader_glsl_get_register_name(
|
|||
char pshader = shader_is_pshader_version(This->baseShader.hex_version);
|
||||
char tmpStr[50];
|
||||
|
||||
*is_color = FALSE;
|
||||
|
||||
*is_color = FALSE;
|
||||
|
||||
switch (regtype) {
|
||||
case WINED3DSPR_TEMP:
|
||||
sprintf(tmpStr, "R%u", reg);
|
||||
|
@ -638,7 +638,7 @@ static void shader_glsl_get_register_name(
|
|||
if (vshader_input_is_color((IWineD3DVertexShader*) This, reg))
|
||||
*is_color = TRUE;
|
||||
sprintf(tmpStr, "attrib%u", reg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WINED3DSPR_CONST:
|
||||
{
|
||||
|
@ -647,7 +647,7 @@ static void shader_glsl_get_register_name(
|
|||
/* Relative addressing */
|
||||
if (param & WINED3DSHADER_ADDRMODE_RELATIVE) {
|
||||
|
||||
/* Relative addressing on shaders 2.0+ have a relative address token,
|
||||
/* Relative addressing on shaders 2.0+ have a relative address token,
|
||||
* prior to that, it was hard-coded as "A0.x" because there's only 1 register */
|
||||
if (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2) {
|
||||
glsl_src_param_t rel_param;
|
||||
|
@ -846,9 +846,9 @@ static DWORD shader_glsl_append_dst(SHADER_BUFFER *buffer, SHADER_OPCODE_ARG *ar
|
|||
|
||||
/** Process GLSL instruction modifiers */
|
||||
void shader_glsl_add_instruction_modifiers(SHADER_OPCODE_ARG* arg) {
|
||||
|
||||
|
||||
DWORD mask = arg->dst & WINED3DSP_DSTMOD_MASK;
|
||||
|
||||
|
||||
if (arg->opcode->dst_token && mask != 0) {
|
||||
glsl_dst_param_t dst_param;
|
||||
|
||||
|
@ -913,9 +913,9 @@ static void shader_glsl_get_sample_function(DWORD sampler_type, BOOL projected,
|
|||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
* Begin processing individual instruction opcodes
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Generate GLSL arithmetic functions (dst = src1 + src2) */
|
||||
|
@ -1286,13 +1286,13 @@ void shader_glsl_mad(SHADER_OPCODE_ARG* arg) {
|
|||
src0_param.param_str, src1_param.param_str, src2_param.param_str);
|
||||
}
|
||||
|
||||
/** Handles transforming all WINED3DSIO_M?x? opcodes for
|
||||
/** Handles transforming all WINED3DSIO_M?x? opcodes for
|
||||
Vertex shaders to GLSL codes */
|
||||
void shader_glsl_mnxn(SHADER_OPCODE_ARG* arg) {
|
||||
int i;
|
||||
int nComponents = 0;
|
||||
SHADER_OPCODE_ARG tmpArg;
|
||||
|
||||
|
||||
memset(&tmpArg, 0, sizeof(SHADER_OPCODE_ARG));
|
||||
|
||||
/* Set constants for the temporary argument */
|
||||
|
@ -1301,8 +1301,8 @@ void shader_glsl_mnxn(SHADER_OPCODE_ARG* arg) {
|
|||
tmpArg.src[0] = arg->src[0];
|
||||
tmpArg.src_addr[0] = arg->src_addr[0];
|
||||
tmpArg.src_addr[1] = arg->src_addr[1];
|
||||
tmpArg.reg_maps = arg->reg_maps;
|
||||
|
||||
tmpArg.reg_maps = arg->reg_maps;
|
||||
|
||||
switch(arg->opcode->opcode) {
|
||||
case WINED3DSIO_M4x4:
|
||||
nComponents = 4;
|
||||
|
@ -1336,7 +1336,7 @@ void shader_glsl_mnxn(SHADER_OPCODE_ARG* arg) {
|
|||
}
|
||||
|
||||
/**
|
||||
The LRP instruction performs a component-wise linear interpolation
|
||||
The LRP instruction performs a component-wise linear interpolation
|
||||
between the second and third operands using the first operand as the
|
||||
blend factor. Equation: (dst = src2 + src0 * (src1 - src2))
|
||||
This is equivalent to mix(src2, src1, src0);
|
||||
|
@ -1408,7 +1408,7 @@ void shader_glsl_dst(SHADER_OPCODE_ARG* arg) {
|
|||
/** Process the WINED3DSIO_SINCOS instruction in GLSL:
|
||||
* VS 2.0 requires that specific cosine and sine constants be passed to this instruction so the hardware
|
||||
* can handle it. But, these functions are built-in for GLSL, so we can just ignore the last 2 params.
|
||||
*
|
||||
*
|
||||
* dst.x = cos(src0.?)
|
||||
* dst.y = sin(src0.?)
|
||||
* dst.z = dst.z
|
||||
|
@ -1450,7 +1450,7 @@ void shader_glsl_loop(SHADER_OPCODE_ARG* arg) {
|
|||
glsl_src_param_t src1_param;
|
||||
|
||||
shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_ALL, &src1_param);
|
||||
|
||||
|
||||
shader_addline(arg->buffer, "for (tmpInt = 0, aL = %s.y; tmpInt < %s.x; tmpInt++, aL += %s.z) {\n",
|
||||
src1_param.reg_name, src1_param.reg_name, src1_param.reg_name);
|
||||
}
|
||||
|
@ -1643,7 +1643,7 @@ void shader_glsl_texldl(SHADER_OPCODE_ARG* arg) {
|
|||
void pshader_glsl_texcoord(SHADER_OPCODE_ARG* arg) {
|
||||
|
||||
/* FIXME: Make this work for more than just 2D textures */
|
||||
|
||||
|
||||
IWineD3DPixelShaderImpl* This = (IWineD3DPixelShaderImpl*) arg->shader;
|
||||
SHADER_BUFFER* buffer = arg->buffer;
|
||||
DWORD hex_version = This->baseShader.hex_version;
|
||||
|
@ -1841,7 +1841,7 @@ void pshader_glsl_texm3x3(SHADER_OPCODE_ARG* arg) {
|
|||
current_state->current_row = 0;
|
||||
}
|
||||
|
||||
/** Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL
|
||||
/** Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL
|
||||
* Peform the final texture lookup based on the previous 2 3x3 matrix multiplies */
|
||||
void pshader_glsl_texm3x3spec(SHADER_OPCODE_ARG* arg) {
|
||||
|
||||
|
@ -1876,7 +1876,7 @@ void pshader_glsl_texm3x3spec(SHADER_OPCODE_ARG* arg) {
|
|||
current_state->current_row = 0;
|
||||
}
|
||||
|
||||
/** Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL
|
||||
/** Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL
|
||||
* Peform the final texture lookup based on the previous 2 3x3 matrix multiplies */
|
||||
void pshader_glsl_texm3x3vspec(SHADER_OPCODE_ARG* arg) {
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
|
|||
};
|
||||
|
||||
static void pshader_set_limits(
|
||||
IWineD3DPixelShaderImpl *This) {
|
||||
IWineD3DPixelShaderImpl *This) {
|
||||
|
||||
This->baseShader.limits.attributes = 0;
|
||||
This->baseShader.limits.address = 0;
|
||||
|
@ -272,7 +272,7 @@ static void pshader_set_limits(
|
|||
case WINED3DPS_VERSION(1,0):
|
||||
case WINED3DPS_VERSION(1,1):
|
||||
case WINED3DPS_VERSION(1,2):
|
||||
case WINED3DPS_VERSION(1,3):
|
||||
case WINED3DPS_VERSION(1,3):
|
||||
This->baseShader.limits.temporary = 2;
|
||||
This->baseShader.limits.constant_float = 8;
|
||||
This->baseShader.limits.constant_int = 0;
|
||||
|
@ -293,8 +293,8 @@ static void pshader_set_limits(
|
|||
This->baseShader.limits.packed_input = 0;
|
||||
This->baseShader.limits.label = 0;
|
||||
break;
|
||||
|
||||
/* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */
|
||||
|
||||
/* FIXME: temporaries must match D3DPSHADERCAPS2_0.NumTemps */
|
||||
case WINED3DPS_VERSION(2,0):
|
||||
This->baseShader.limits.temporary = 32;
|
||||
This->baseShader.limits.constant_float = 32;
|
||||
|
@ -335,7 +335,7 @@ static void pshader_set_limits(
|
|||
This->baseShader.limits.sampler = 16;
|
||||
This->baseShader.limits.packed_input = 0;
|
||||
This->baseShader.limits.label = 0;
|
||||
FIXME("Unrecognized pixel shader version %#x\n",
|
||||
FIXME("Unrecognized pixel shader version %#x\n",
|
||||
This->baseShader.hex_version);
|
||||
}
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ static inline VOID IWineD3DPixelShaderImpl_GenerateShader(
|
|||
}
|
||||
buffer.buffer = This->device->fixupVertexBuffer;
|
||||
#else
|
||||
buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
|
||||
buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
|
||||
#endif
|
||||
buffer.bsize = 0;
|
||||
buffer.lineNo = 0;
|
||||
|
@ -456,7 +456,7 @@ static inline VOID IWineD3DPixelShaderImpl_GenerateShader(
|
|||
shader_addline(&buffer, "MOV result.color.a, TMP_COLOR.a;\n");
|
||||
}
|
||||
|
||||
shader_addline(&buffer, "END\n");
|
||||
shader_addline(&buffer, "END\n");
|
||||
|
||||
/* TODO: change to resource.glObjectHandle or something like that */
|
||||
GL_EXTCALL(glGenProgramsARB(1, &This->baseShader.prgId));
|
||||
|
|
|
@ -47,7 +47,7 @@ ULONG WINAPI IWineD3DResourceImpl_AddRef(IWineD3DResource *iface) {
|
|||
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
|
||||
ULONG ref = InterlockedIncrement(&This->resource.ref);
|
||||
TRACE("(%p) : AddRef increasing from %d\n", This, ref - 1);
|
||||
return ref;
|
||||
return ref;
|
||||
}
|
||||
|
||||
ULONG WINAPI IWineD3DResourceImpl_Release(IWineD3DResource *iface) {
|
||||
|
|
|
@ -2216,7 +2216,7 @@ static void shaderconstant(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
|
|||
isStateDirty(context, STATE_PIXELSHADER)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
device->shader_backend->shader_load_constants((IWineD3DDevice *) device, use_ps(device), use_vs(device));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
|||
* Stateblock helper functions follow
|
||||
**************************************/
|
||||
|
||||
/** Allocates the correct amount of space for pixel and vertex shader constants,
|
||||
/** Allocates the correct amount of space for pixel and vertex shader constants,
|
||||
* along with their set/changed flags on the given stateblock object
|
||||
*/
|
||||
HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object) {
|
||||
|
||||
|
||||
IWineD3DStateBlockImpl *This = object;
|
||||
|
||||
#define WINED3D_MEMCHECK(_object) if (NULL == _object) { FIXME("Out of memory!\n"); return E_OUTOFMEMORY; }
|
||||
|
@ -66,7 +66,7 @@ void stateblock_savedstates_copy(
|
|||
IWineD3DStateBlock* iface,
|
||||
SAVEDSTATES* dest,
|
||||
SAVEDSTATES* source) {
|
||||
|
||||
|
||||
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
|
||||
unsigned bsize = sizeof(BOOL);
|
||||
|
||||
|
@ -104,7 +104,7 @@ void stateblock_savedstates_set(
|
|||
IWineD3DStateBlock* iface,
|
||||
SAVEDSTATES* states,
|
||||
BOOL value) {
|
||||
|
||||
|
||||
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
|
||||
unsigned bsize = sizeof(BOOL);
|
||||
|
||||
|
@ -196,7 +196,7 @@ void stateblock_copy(
|
|||
memcpy(Dest->vertexShaderConstantI, This->vertexShaderConstantI, sizeof(INT) * MAX_CONST_I * 4);
|
||||
memcpy(Dest->pixelShaderConstantB, This->pixelShaderConstantB, sizeof(BOOL) * MAX_CONST_B);
|
||||
memcpy(Dest->pixelShaderConstantI, This->pixelShaderConstantI, sizeof(INT) * MAX_CONST_I * 4);
|
||||
|
||||
|
||||
memcpy(Dest->streamStride, This->streamStride, sizeof(UINT) * MAX_STREAMS);
|
||||
memcpy(Dest->streamOffset, This->streamOffset, sizeof(UINT) * MAX_STREAMS);
|
||||
memcpy(Dest->streamSource, This->streamSource, sizeof(IWineD3DVertexBuffer*) * MAX_STREAMS);
|
||||
|
|
|
@ -988,7 +988,7 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This) {
|
|||
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
{
|
||||
/* make sure the X byte is set to alpha on, since it
|
||||
/* make sure the X byte is set to alpha on, since it
|
||||
could be any random value. This fixes the intro movie in Pirates! */
|
||||
int size;
|
||||
unsigned int *data;
|
||||
|
@ -2444,7 +2444,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS
|
|||
if( !(This->resource.usage & WINED3DUSAGE_RENDERTARGET) ) return WINEDDERR_NOTFLIPPABLE;
|
||||
|
||||
if(override) {
|
||||
/* DDraw sets this for the X11 surfaces, so don't confuse the user
|
||||
/* DDraw sets this for the X11 surfaces, so don't confuse the user
|
||||
* FIXME("(%p) Target override is not supported by now\n", This);
|
||||
* Additionally, it isn't really possible to support triple-buffering
|
||||
* properly on opengl at all
|
||||
|
@ -3428,7 +3428,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPa
|
|||
IWineD3DPaletteImpl *PalImpl = (IWineD3DPaletteImpl *) Pal;
|
||||
TRACE("(%p)->(%p)\n", This, Pal);
|
||||
|
||||
if(This->palette != NULL)
|
||||
if(This->palette != NULL)
|
||||
if(This->resource.usage & WINED3DUSAGE_RENDERTARGET)
|
||||
This->palette->Flags &= ~WINEDDPCAPS_PRIMARYSURFACE;
|
||||
|
||||
|
|
|
@ -1465,7 +1465,7 @@ const char* filename)
|
|||
|
||||
for (y = 0; y < This->pow2Height; y++) {
|
||||
unsigned char *src = (unsigned char *) This->resource.allocatedMemory + (y * 1 * IWineD3DSurface_GetPitch(iface));
|
||||
for (x = 0; x < This->pow2Width; x++) {
|
||||
for (x = 0; x < This->pow2Width; x++) {
|
||||
unsigned int color;
|
||||
unsigned int comp;
|
||||
int i;
|
||||
|
|
|
@ -181,7 +181,7 @@ static void vshader_set_limits(
|
|||
This->baseShader.limits.sampler = 0;
|
||||
This->baseShader.limits.label = 0;
|
||||
break;
|
||||
|
||||
|
||||
case WINED3DVS_VERSION(2,0):
|
||||
case WINED3DVS_VERSION(2,1):
|
||||
This->baseShader.limits.temporary = 12;
|
||||
|
@ -315,7 +315,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
|||
}
|
||||
buffer.buffer = This->device->fixupVertexBuffer;
|
||||
#else
|
||||
buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
|
||||
buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
|
||||
#endif
|
||||
buffer.bsize = 0;
|
||||
buffer.lineNo = 0;
|
||||
|
@ -339,7 +339,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
|||
/* If this shader doesn't use fog copy the z coord to the fog coord so that we can use table fog */
|
||||
if (!reg_maps->fog)
|
||||
shader_addline(&buffer, "gl_FogFragCoord = gl_Position.z;\n");
|
||||
|
||||
|
||||
/* Write the final position.
|
||||
*
|
||||
* OpenGL coordinates specify the center of the pixel while d3d coords specify
|
||||
|
@ -371,7 +371,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
|||
|
||||
/* Mesa supports only 95 constants */
|
||||
if (GL_VEND(MESA) || GL_VEND(WINE))
|
||||
This->baseShader.limits.constant_float =
|
||||
This->baseShader.limits.constant_float =
|
||||
min(95, This->baseShader.limits.constant_float);
|
||||
|
||||
/* Base Declarations */
|
||||
|
@ -401,8 +401,8 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
|
|||
shader_addline(&buffer, "MUL TMP_OUT.y, TMP_OUT.y, posFixup.y;\n");
|
||||
|
||||
shader_addline(&buffer, "MOV result.position, TMP_OUT;\n");
|
||||
|
||||
shader_addline(&buffer, "END\n");
|
||||
|
||||
shader_addline(&buffer, "END\n");
|
||||
|
||||
/* TODO: change to resource.glObjectHandle or something like that */
|
||||
GL_EXTCALL(glGenProgramsARB(1, &This->baseShader.prgId));
|
||||
|
@ -436,7 +436,7 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShad
|
|||
{
|
||||
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
|
||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
||||
|| IsEqualGUID(riid, &IID_IWineD3DBaseShader)
|
||||
|| IsEqualGUID(riid, &IID_IWineD3DVertexShader)) {
|
||||
|
@ -495,7 +495,7 @@ static ULONG WINAPI IWineD3DVertexShaderImpl_Release(IWineD3DVertexShader *iface
|
|||
|
||||
static HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *iface, IUnknown** parent){
|
||||
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
|
||||
|
||||
|
||||
*parent = This->parent;
|
||||
IUnknown_AddRef(*parent);
|
||||
TRACE("(%p) : returning %p\n", This, *parent);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<module name="wined3d" type="win32dll" installbase="system32" installname="wined3d.dll" allowwarnings ="true">
|
||||
<module name="wined3d" type="win32dll" installbase="system32" installname="wined3d.dll" allowwarnings ="true">
|
||||
<importlibrary definition="wined3d.def" />
|
||||
<include base="wined3d">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
|
|
|
@ -34,7 +34,7 @@ void (*wine_tsx11_unlock_ptr)(void) = NULL;
|
|||
|
||||
/* When updating default value here, make sure to update winecfg as well,
|
||||
* where appropriate. */
|
||||
wined3d_settings_t wined3d_settings =
|
||||
wined3d_settings_t wined3d_settings =
|
||||
{
|
||||
VS_HW, /* Hardware by default */
|
||||
PS_HW, /* Hardware by default */
|
||||
|
|
|
@ -158,7 +158,7 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
|
|||
#define WINED3D_ATR_TYPESIZE(type) glTypeLookup[type].typesize
|
||||
|
||||
/**
|
||||
* Settings
|
||||
* Settings
|
||||
*/
|
||||
#define VS_NONE 0
|
||||
#define VS_HW 1
|
||||
|
@ -270,7 +270,7 @@ extern int num_lock;
|
|||
#define MAX_STREAMS 16 /* Maximum possible streams - used for fixed size arrays
|
||||
See MaxStreams in MSDN under GetDeviceCaps */
|
||||
/* Maximum number of constants provided to the shaders */
|
||||
#define HIGHEST_TRANSFORMSTATE 512
|
||||
#define HIGHEST_TRANSFORMSTATE 512
|
||||
/* Highest value in WINED3DTRANSFORMSTATETYPE */
|
||||
#define MAX_PALETTES 256
|
||||
|
||||
|
@ -287,7 +287,7 @@ extern int num_lock;
|
|||
debug_glerror(err), err, A, __FILE__, __LINE__); \
|
||||
err = glGetError(); \
|
||||
} while (err != GL_NO_ERROR); \
|
||||
}
|
||||
}
|
||||
|
||||
/* Trace routines / diagnostics */
|
||||
/* ---------------------------- */
|
||||
|
@ -356,8 +356,8 @@ extern const float identity[16];
|
|||
/* Trace information per-vertex: (extremely high amount of trace) */
|
||||
#if 0 /* NOTE: Must be 0 in cvs */
|
||||
# define VTRACE(A) TRACE A
|
||||
#else
|
||||
# define VTRACE(A)
|
||||
#else
|
||||
# define VTRACE(A)
|
||||
#endif
|
||||
|
||||
/* Checking of per-vertex related GL calls */
|
||||
|
@ -385,21 +385,21 @@ extern const float identity[16];
|
|||
the file is deleted */
|
||||
# if 1 /* NOTE: Must be 1 in cvs, as this is mostly more useful than a trace from program start */
|
||||
# define SINGLE_FRAME_DEBUGGING
|
||||
# endif
|
||||
# endif
|
||||
/* The following, when enabled, lets you see the makeup of the frame, by drawprimitive calls.
|
||||
It can only be enabled when FRAME_DEBUGGING is also enabled
|
||||
The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
|
||||
It can only be enabled when FRAME_DEBUGGING is also enabled
|
||||
The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
|
||||
array is drawn. */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# define SHOW_FRAME_MAKEUP 1
|
||||
# endif
|
||||
# endif
|
||||
/* The following, when enabled, lets you see the makeup of the all the textures used during each
|
||||
of the drawprimitive calls. It can only be enabled when SHOW_FRAME_MAKEUP is also enabled.
|
||||
The contents of the textures assigned to each stage are written into
|
||||
The contents of the textures assigned to each stage are written into
|
||||
/tmp/texture_*_<Stage>.ppm after each primitive array is drawn. */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# define SHOW_TEXTURE_MAKEUP 0
|
||||
# endif
|
||||
# endif
|
||||
extern BOOL isOn;
|
||||
extern BOOL isDumpingFrames;
|
||||
extern LONG primCounter;
|
||||
|
@ -954,7 +954,7 @@ typedef struct IWineD3DTextureImpl
|
|||
|
||||
/* IWineD3DTexture */
|
||||
IWineD3DSurface *surfaces[MAX_LEVELS];
|
||||
|
||||
|
||||
UINT width;
|
||||
UINT height;
|
||||
float pow2scalingFactorX;
|
||||
|
@ -1443,7 +1443,7 @@ typedef struct IWineD3DQueryImpl
|
|||
{
|
||||
const IWineD3DQueryVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
|
||||
IUnknown *parent;
|
||||
/*TODO: replace with iface usage */
|
||||
#if 0
|
||||
|
@ -1456,8 +1456,8 @@ typedef struct IWineD3DQueryImpl
|
|||
WINED3DQUERYTYPE type;
|
||||
/* TODO: Think about using a IUnknown instead of a void* */
|
||||
void *extendedData;
|
||||
|
||||
|
||||
|
||||
|
||||
} IWineD3DQueryImpl;
|
||||
|
||||
extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl;
|
||||
|
@ -1506,7 +1506,7 @@ extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl;
|
|||
WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface);
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function prototypes
|
||||
* Utility function prototypes
|
||||
*/
|
||||
|
||||
/* Trace routines */
|
||||
|
@ -1547,9 +1547,9 @@ BOOL getDepthStencilBits(WINED3DFORMAT fmt, short *depthSize, short *stencilSize
|
|||
void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2);
|
||||
|
||||
/*****************************************************************************
|
||||
* To enable calling of inherited functions, requires prototypes
|
||||
* To enable calling of inherited functions, requires prototypes
|
||||
*
|
||||
* Note: Only require classes which are subclassed, ie resource, basetexture,
|
||||
* Note: Only require classes which are subclassed, ie resource, basetexture,
|
||||
*/
|
||||
/*** IUnknown methods ***/
|
||||
extern HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFIID riid, void** ppvObject);
|
||||
|
@ -1656,7 +1656,7 @@ typedef struct shader_reg_maps {
|
|||
char attributes[MAX_ATTRIBS]; /* vertex */
|
||||
char labels[MAX_LABELS]; /* pixel, vertex */
|
||||
|
||||
/* Sampler usage tokens
|
||||
/* Sampler usage tokens
|
||||
* Use 0 as default (bit 31 is always 1 on a valid token) */
|
||||
DWORD samplers[max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS)];
|
||||
char bumpmat;
|
||||
|
@ -1729,21 +1729,21 @@ typedef struct SHADER_LIMITS {
|
|||
unsigned int label;
|
||||
} SHADER_LIMITS;
|
||||
|
||||
/** Keeps track of details for TEX_M#x# shader opcodes which need to
|
||||
/** Keeps track of details for TEX_M#x# shader opcodes which need to
|
||||
maintain state information between multiple codes */
|
||||
typedef struct SHADER_PARSE_STATE {
|
||||
unsigned int current_row;
|
||||
DWORD texcoord_w[2];
|
||||
} SHADER_PARSE_STATE;
|
||||
|
||||
/* Base Shader utility functions.
|
||||
/* Base Shader utility functions.
|
||||
* (may move callers into the same file in the future) */
|
||||
extern int shader_addline(
|
||||
SHADER_BUFFER* buffer,
|
||||
const char* fmt, ...);
|
||||
|
||||
extern const SHADER_OPCODE* shader_get_opcode(
|
||||
IWineD3DBaseShader *iface,
|
||||
IWineD3DBaseShader *iface,
|
||||
const DWORD code);
|
||||
|
||||
extern void shader_delete_constant_list(
|
||||
|
@ -2012,7 +2012,7 @@ static inline BOOL shader_is_scalar(DWORD param) {
|
|||
* IDirect3DVertexShader implementation structure
|
||||
*/
|
||||
typedef struct IWineD3DVertexShaderImpl {
|
||||
/* IUnknown parts*/
|
||||
/* IUnknown parts*/
|
||||
const IWineD3DVertexShaderVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef enum _WINED3DSAMPLER_TEXTURE_TYPE {
|
|||
|
||||
/** Register types **/
|
||||
typedef enum _WINED3DSHADER_PARAM_REGISTER_TYPE {
|
||||
WINED3DSPR_TEMP = 0,
|
||||
WINED3DSPR_TEMP = 0,
|
||||
WINED3DSPR_INPUT = 1,
|
||||
WINED3DSPR_CONST = 2,
|
||||
WINED3DSPR_ADDR = 3,
|
||||
|
|
Loading…
Reference in a new issue