Changeset 83176 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 27, 2020 7:07:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
r82700 r83176 1055 1055 if (map & 1) shader_addline(buffer, "void subroutine%u();\n", i); 1056 1056 } 1057 1058 #ifdef VBOX_WITH_VMSVGA 1059 /* Declare texture samplers before the constants in order to workaround a NVidia driver quirk. */ 1060 for (i = 0; i < This->baseShader.limits.sampler; i++) { 1061 if (reg_maps->sampler_type[i]) 1062 { 1063 switch (reg_maps->sampler_type[i]) 1064 { 1065 case WINED3DSTT_1D: 1066 shader_addline(buffer, "uniform sampler1D %csampler%u;\n", prefix, i); 1067 break; 1068 case WINED3DSTT_2D: 1069 if(device->stateBlock->textures[i] && 1070 IWineD3DBaseTexture_GetTextureDimensions(device->stateBlock->textures[i]) == GL_TEXTURE_RECTANGLE_ARB) { 1071 shader_addline(buffer, "uniform sampler2DRect %csampler%u;\n", prefix, i); 1072 } else { 1073 shader_addline(buffer, "uniform sampler2D %csampler%u;\n", prefix, i); 1074 } 1075 break; 1076 case WINED3DSTT_CUBE: 1077 shader_addline(buffer, "uniform samplerCube %csampler%u;\n", prefix, i); 1078 break; 1079 case WINED3DSTT_VOLUME: 1080 shader_addline(buffer, "uniform sampler3D %csampler%u;\n", prefix, i); 1081 break; 1082 default: 1083 shader_addline(buffer, "uniform unsupported_sampler %csampler%u;\n", prefix, i); 1084 FIXME("Unrecognized sampler type: %#x\n", reg_maps->sampler_type[i]); 1085 break; 1086 } 1087 } 1088 } 1089 #endif 1057 1090 1058 1091 /* Declare the constants (aka uniforms) */ … … 1216 1249 } 1217 1250 1251 #ifdef VBOX_WITH_VMSVGA 1252 /* Declare texture samplers before the constants in order to workaround a NVidia driver quirk. */ 1253 #else 1218 1254 /* Declare texture samplers */ 1219 1255 for (i = 0; i < This->baseShader.limits.sampler; i++) { … … 1246 1282 } 1247 1283 } 1284 #endif 1248 1285 1249 1286 /* Declare uniforms for NP2 texcoord fixup:
Note:
See TracChangeset
for help on using the changeset viewer.