Permalink
Browse files

Merge pull request #61 from Psychtoolbox-3/master

"Broken Windows" release: Post-Release bugfix for NVidia gpu driver bug.
  • Loading branch information...
kleinerm committed Sep 17, 2012
2 parents 98fda1f + 361f146 commit fde2c3f5e00dabd27fc83356659f8099c78c585f
@@ -841,8 +841,10 @@ void PsychBlitTextureToDisplay(PsychWindowRecordType *source, PsychWindowRecordT
// This makes even sense for negative filterMode arguments, because the filterMode
// parameter is passed as an attribute to the filtershader, so the shader itself can
// decide how to implement a specific blur level on its own, unrestricted by us:
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
if (texturetarget == GL_TEXTURE_2D) {
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
}
}
else {
// Standard hardware texture sampling/filtering: Select filter-mode for texturing:
@@ -881,8 +883,10 @@ void PsychBlitTextureToDisplay(PsychWindowRecordType *source, PsychWindowRecordT
}
// Don't restrict mipmap-levels for sampling, reset to initial system defaults:
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
if (texturetarget == GL_TEXTURE_2D) {
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
}
}
else {
// Negative filterMode: This is mostly meant for fast drawing of blurred (low-pass filtered) textures
@@ -894,8 +898,10 @@ void PsychBlitTextureToDisplay(PsychWindowRecordType *source, PsychWindowRecordT
// mipmap pyramid, according to the filterMode, starting with mip level 0, i.e,
// full resolution for a value of -1, then level 1 aka half-resolution for a value
// of -2 etc.:
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, (-1 * filterMode) - 1);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, (-1 * filterMode) - 1);
if (texturetarget == GL_TEXTURE_2D) {
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, (-1 * filterMode) - 1);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, (-1 * filterMode) - 1);
}
}
// Optional texture lookup shader set up (in Screen('MakeTexture') or due to disabled color clamping...)
@@ -1116,8 +1122,10 @@ void PsychBlitTextureToDisplay(PsychWindowRecordType *source, PsychWindowRecordT
glTexParameteri(texturetarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// Don't restrict mipmap-levels for sampling, reset to initial system defaults:
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
if (texturetarget == GL_TEXTURE_2D) {
glTexParameteri(texturetarget, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(texturetarget, GL_TEXTURE_MAX_LEVEL, 1000);
}
// Unbind texture:
glBindTexture(texturetarget, 0);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,6 +31,7 @@
% 8/12/11 dhb Start to write CIE version. Return lensDensity too.
% dhb Finish. Add pupil size.
% 8/13/11 dhb Linearly extrapolate read functions outside of range.
% 9/17/12 dhb Return density for 'None' case as well.
% Default
if (nargin < 2 || isempty(species))
@@ -105,6 +106,7 @@
switch (source)
case ('None'),
lensTransmit = ones(S(3),1)';
lensDensity = zeros(S(3),1)';
otherwise,
error('Unsupported species specified');
end
@@ -39,6 +39,8 @@
% of the correction factor.
% 5/8/12 dhb Removed comment that we can't reproduce CIE tabular 10 deg
% values.
% 9/17/12 dhb Return density for 'None' case as well.
% Default
if (nargin < 2 || isempty(species))
@@ -95,6 +97,7 @@
switch (source)
case ('None'),
macTransmit = ones(S(3),1)';
macDensity = zeros(S(3),1)';
otherwise,
error('Unsupported species specified');
end
@@ -18,7 +18,6 @@
% clear
clear all;
% Set some photoreceptor properties
% Set some photoreceptor properties.
photoreceptors = DefaultPhotoreceptors('GuineaPig');
photoreceptors = FillInPhotoreceptors(photoreceptors);
@@ -37,7 +36,7 @@
% Routine WattsToRetIrradiance does the conversion, taking into account
% instrument calibration information as well as the relative spectrum,
% which here we just load.
load spd_apparatusrel % Relative spectrum measured in apparatus
load spd_apparatusrel % Relative spectrum measured in apparatus
readingInWatts = 0.0128e-6 ; % Watts (0.0128 uWatts)
[irradianceWatts,irradianceS] = WattsToRetIrradiance( ...
spd_apparatusrel,S_apparatusrel,readingInWatts);

0 comments on commit fde2c3f

Please sign in to comment.