From 375555012f92c1b836f2d122754f9facd050be62 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 14 Jun 2024 17:06:07 -0500 Subject: 1736 audit texture image unit usage on os x (#1739) * #1736 Remove some unused samplers from glsl files and refactor shader manager to assume 16 texture image units and 4 indexed texture units all the time. --- indra/newview/app_settings/logcontrol.xml | 2 +- indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl | 3 +-- indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl | 2 -- indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl | 1 - indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl | 1 - .../newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl | 2 -- indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl | 1 - indra/newview/app_settings/shaders/class1/interface/copyF.glsl | 3 +++ indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl | 2 -- .../newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl | 1 - indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl | 2 -- indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 2 -- indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl | 3 --- indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl | 2 -- indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl | 1 - 15 files changed, 5 insertions(+), 23 deletions(-) (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 482012cdd6..51b5c66384 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -71,7 +71,7 @@ Inventory SceneLoadTiming Avatar - Voice + Voice --> diff --git a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl index 49470f0e39..ce018623a8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl @@ -23,8 +23,7 @@ * $/LicenseInfo$ */ -uniform sampler2D noiseMap; -uniform sampler2D normalMap; +uniform sampler2D noiseMap; uniform sampler2D depthMap; uniform float ssao_radius; diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl index 438e1d1b33..37dcbbd328 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl @@ -27,8 +27,6 @@ out vec4 frag_color; -uniform sampler2D diffuseMap; - void main() { frag_color = vec4(1,1,1,1); diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index d7d98477c0..23a3ca4911 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -27,7 +27,6 @@ out vec4 frag_color; -uniform sampler2D normalMap; uniform sampler2D lightMap; uniform float dist_factor; diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index 3ea2248bec..ab0e4fd4d8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -50,7 +50,6 @@ SOFTWARE. uniform sampler2D normalMap; uniform sampler2D depthMap; -uniform sampler2D emissiveRect; uniform sampler2D projectionMap; // rgba uniform sampler2D brdfLut; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index 9db8f461dd..f208ac746b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -27,8 +27,6 @@ out vec4 frag_color; -uniform sampler2D diffuseMap; - in vec4 post_pos; in float target_pos_x; in vec4 vertex_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index 16cc7cfbbc..6f7bd2bf3c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -24,7 +24,6 @@ */ uniform sampler2D normalMap; -uniform sampler2D depthMap; #if defined(SUN_SHADOW) uniform sampler2DShadow shadowMap0; diff --git a/indra/newview/app_settings/shaders/class1/interface/copyF.glsl b/indra/newview/app_settings/shaders/class1/interface/copyF.glsl index edaa2488f0..094d147e86 100644 --- a/indra/newview/app_settings/shaders/class1/interface/copyF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/copyF.glsl @@ -25,7 +25,10 @@ in vec2 tc; +#if defined(COPY_DEPTH) uniform sampler2D depthMap; +#endif + uniform sampler2D diffuseMap; out vec4 frag_color; diff --git a/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl index 87977eb28c..7b82aa1a0d 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl @@ -25,8 +25,6 @@ out vec4 frag_color; -uniform sampler2D normalMap; - // Inputs uniform vec3 sun_dir; uniform vec3 moon_dir; diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index ac3fec23f6..4ed778371f 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -27,7 +27,6 @@ out vec4 frag_color; -uniform sampler2D depthMap; uniform sampler2D diffuseRect; uniform sampler2D specularRect; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl index e419525bd5..6c13757149 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl @@ -29,10 +29,8 @@ out vec4 frag_color; uniform sampler2D diffuseRect; uniform sampler2D specularRect; -uniform sampler2D normalMap; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl uniform sampler2D lightFunc; -uniform sampler2D depthMap; uniform vec3 env_mat[3]; uniform float sun_wash; diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index 529d1cba6b..ca88fe7482 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -29,7 +29,6 @@ out vec4 frag_color; uniform sampler2D diffuseRect; uniform sampler2D specularRect; -uniform sampler2D normalMap; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl const float M_PI = 3.14159265; @@ -38,7 +37,6 @@ const float M_PI = 3.14159265; uniform sampler2D lightMap; #endif -uniform sampler2D depthMap; uniform sampler2D lightFunc; uniform float blur_size; diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 092b0c3c08..bc4d36d10d 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -29,12 +29,9 @@ out vec4 frag_color; uniform sampler2D diffuseRect; uniform sampler2D specularRect; -uniform sampler2D depthMap; -uniform sampler2D normalMap; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl uniform samplerCube environmentMap; uniform sampler2D lightMap; -uniform sampler2D projectionMap; // rgba uniform sampler2D lightFunc; uniform mat4 proj_mat; //screen space to light space diff --git a/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl index a5a37d80dd..2bf785e773 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/waterHazeF.glsl @@ -28,8 +28,6 @@ out vec4 frag_color; // Inputs in vec4 vary_fragcoord; -uniform sampler2D normalMap; - vec4 getPositionWithDepth(vec2 pos_screen, float depth); float getDepth(vec2 pos_screen); diff --git a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl index 728d70ebb2..1c02dc764d 100644 --- a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl @@ -25,7 +25,6 @@ out vec4 frag_color; -uniform sampler2D diffuseMap; uniform sampler2D bumpMap; #ifdef TRANSPARENT_WATER -- cgit v1.2.3