Module: wine
Branch: refs/heads/master
Commit: bbe7b40a71e18be90a6f4fbd2300a6c82af95a87
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=bbe7b40a71e18be90a6f4fb…
Author: Ivan Gyurdiev <ivg231(a)gmail.com>
Date: Tue Jul 4 01:27:25 2006 -0600
wined3d: Fix STREAM flag override.
---
dlls/wined3d/device.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index edaa221..860eba5 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2424,7 +2424,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl
return WINED3D_OK;
}
- /* Not recording... */
+ /* Same stream object: no action */
+ if (oldSrc == pStreamData)
+ return WINED3D_OK;
+
/* Need to do a getParent and pass the reffs up */
/* MSDN says ..... When an application no longer holds a references to this interface, the interface will automatically be freed.
which suggests that we shouldn't be ref counting? and do need a _release on the stream source to reset the stream source
Module: wine
Branch: refs/heads/master
Commit: b324fc0fdb3fe79b5ad3388e5f6aebe5541cf5c8
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b324fc0fdb3fe79b5ad3388…
Author: Ivan Gyurdiev <ivg231(a)gmail.com>
Date: Tue Jul 4 01:23:18 2006 -0600
wined3d: Allow mix of SW vertex and GLSL pixel shader.
Do not attach non-GLSL shaders to the GLSL program, that will cause a
crash. Mix with ARB shaders is never going to happen, because the
selection code will always choose GLSL for both or ARB for both.
---
dlls/wined3d/device.c | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 2d6a1f3..edaa221 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -287,7 +287,7 @@ void set_glsl_shader_program(IWineD3DDev
This->stateBlock->shaderPrgId = 0;
return;
}
-
+
ptr = list_head( &This->glsl_shader_progs );
while (ptr) {
/* At least one program exists - see if it matches our ps/vs combination */
@@ -302,17 +302,23 @@ void set_glsl_shader_program(IWineD3DDev
/* This isn't the entry we need - try the next one */
ptr = list_next( &This->glsl_shader_progs, ptr );
}
-
+
/* If we get to this point, then no matching program exists, so we create one */
programId = GL_EXTCALL(glCreateProgramObjectARB());
TRACE_(d3d_shader)("Created new GLSL shader program %u\n", programId);
This->stateBlock->shaderPrgId = programId;
-
- if (NULL != vshader) {
+
+ /* Allocate a new link for the list of programs */
+ newLink = HeapAlloc(GetProcessHeap(), 0, sizeof(struct glsl_shader_prog_link));
+ newLink->programId = programId;
+
+ /* Attach GLSL vshader */
+ if (NULL != vshader && wined3d_settings.vs_selected_mode == SHADER_GLSL) {
int i;
int max_attribs = 16; /* TODO: Will this always be the case? It is at the moment... */
char tmp_name[10];
-
+
+ TRACE("Attaching vertex shader to GLSL program\n");
attach_glsl_shader(iface, (IWineD3DBaseShader*)vshader);
/* Bind vertex attributes to a corresponding index number to match
@@ -329,28 +335,21 @@ void set_glsl_shader_program(IWineD3DDev
GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name));
}
checkGLcall("glBindAttribLocationARB");
+ newLink->vertexShader = vshader;
}
- if (NULL != pshader) {
+ /* Attach GLSL pshader */
+ if (NULL != pshader && wined3d_settings.ps_selected_mode == SHADER_GLSL) {
+ TRACE("Attaching pixel shader to GLSL program\n");
attach_glsl_shader(iface, (IWineD3DBaseShader*)pshader);
- }
-
+ newLink->pixelShader = pshader;
+ }
+
/* Link the program */
TRACE_(d3d_shader)("Linking GLSL shader program %u\n", programId);
GL_EXTCALL(glLinkProgramARB(programId));
print_glsl_info_log(&GLINFO_LOCATION, programId);
-
- /* Now, we add a list item to associate this program with the vertex and
- * pixel shaders that it is attached to.
- *
- * These list items will be deleted when the device is released.
- */
- newLink = HeapAlloc(GetProcessHeap(), 0, sizeof(struct glsl_shader_prog_link));
- newLink->programId = programId;
- newLink->pixelShader = pshader;
- newLink->vertexShader = vshader;
list_add_head( &This->glsl_shader_progs, &newLink->entry);
-
return;
}
Module: wine
Branch: refs/heads/master
Commit: 771623692ea6a7f8070b2f96fda46d0debce42e6
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=771623692ea6a7f8070b2f9…
Author: Ivan Gyurdiev <ivg231(a)gmail.com>
Date: Tue Jul 4 01:21:53 2006 -0600
wined3d: Rework shader mode selection.
- currently half the shader selection code (GLSL vs ARB) is in
fillGLcaps. The parts that check for software shaders are in
GetDeviceCaps. That placement, will work, but is definitely not optimal.
FillGLcaps should detect support - it should not make decision as to
what's used, because that's not what the purpose of the function is.
GetDeviceCaps should report support as it has already been selected.
Instead, select shader mode in its own function, called in the
appropriate places.
- unifying pixel and vertex shaders into a single selection is a
mistake. A software vertex shader can be coupled with a hardware arb or
glsl pixel shader, or no shader at all. Split them back into two and add
a SHADER_NONE variant.
- drawprim is doing support checks for ARB_PROGRAM, and making shader
decisions based on that - that's wrong, support has already been
checked, and decided upon, and shaders can be implemented via software,
ARB_PROGRAm or GLSL, so that support check isn't valid.
- Store the shader selected mode into the shader itself. Different types
of shaders can be combined, so this is an improvement. In fact, storing
the mode into the settings globally is a mistake as well - it should be
done per device, since different cards have different capabilities.
---
dlls/wined3d/baseshader.c | 13 ++++-
dlls/wined3d/device.c | 4 +-
dlls/wined3d/directx.c | 95 ++++++++++++++++++++++++++--------------
dlls/wined3d/drawprim.c | 38 ++++++++--------
dlls/wined3d/pixelshader.c | 9 ++--
dlls/wined3d/vertexshader.c | 10 +++-
dlls/wined3d/wined3d_private.h | 8 +++
7 files changed, 108 insertions(+), 69 deletions(-)
Diff: http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=771623692ea6a7f8070…
Module: wine
Branch: refs/heads/master
Commit: 2adeefe38897ec138f623a68e36e249de40c0943
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2adeefe38897ec138f623a6…
Author: Ge van Geldorp <ge(a)gse.nl>
Date: Fri Jun 30 21:37:34 2006 +0200
configure: Allow relocation on x86_64.
---
configure | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 7b53f6b..ece71b4 100755
--- a/configure
+++ b/configure
@@ -16915,7 +16915,7 @@ echo "${ECHO_T}$ac_cv_ld_rpath" >&6; }
fi
case $host_cpu in
- *i[3456789]86*)
+ *i[3456789]86* | x86_64)
{ echo "$as_me:$LINENO: checking whether we can relocate the executable to 0x7bf00000" >&5
echo $ECHO_N "checking whether we can relocate the executable to 0x7bf00000... $ECHO_C" >&6; }
if test "${ac_cv_ld_reloc_exec+set}" = set; then
diff --git a/configure.ac b/configure.ac
index be376f2..3c55d8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1121,7 +1121,7 @@ case $host_os in
fi
case $host_cpu in
- *i[[3456789]]86*)
+ *i[[3456789]]86* | x86_64)
AC_CACHE_CHECK([whether we can relocate the executable to 0x7bf00000], ac_cv_ld_reloc_exec,
[WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x7bf00400],
ac_cv_ld_reloc_exec="yes", ac_cv_ld_reloc_exec="no")])