Changeset 43333 in vbox
- Timestamp:
- Sep 14, 2012 5:23:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r41821 r43333 340 340 static void shader_glsl_dump_program_source(const struct wined3d_gl_info *gl_info, GLhandleARB program) 341 341 { 342 GLint i, object_count , source_size;342 GLint i, object_count; 343 343 GLhandleARB *objects; 344 344 char *source = NULL; … … 3966 3966 } 3967 3967 3968 static void generate_texcoord_assignment(struct wined3d_shader_buffer *buffer, IWineD3DVertexShaderImpl *vs, IWineD3DPixelShaderImpl *ps) 3969 { 3970 DWORD map; 3971 unsigned int i; 3972 char reg_mask[6]; 3973 3974 for (i = 0, map = ps->baseShader.reg_maps.texcoord; map && i < min(8, MAX_REG_TEXCRD); map >>= 1, ++i) 3975 { 3976 if (!map & 1) 3977 continue; 3978 3979 /* so far we assume that if texcoord_mask has any write flags, they are assigned appropriately with pixel shader */ 3980 if ((vs->baseShader.reg_maps.texcoord_mask[i]) & WINED3DSP_WRITEMASK_ALL) 3981 continue; 3982 3983 shader_glsl_write_mask_to_str(WINED3DSP_WRITEMASK_ALL, reg_mask); 3984 shader_addline(buffer, "gl_TexCoord[%u]%s = gl_MultiTexCoord%u%s;\n", i, reg_mask, i, reg_mask); 3985 } 3986 } 3987 3968 3988 /* GL locking is done by the caller */ 3969 3989 static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer *buffer, … … 4003 4023 shader_addline(buffer, "}\n"); 4004 4024 } else { 4005 shader_addline(buffer, "void order_ps_input() { /* do nothing */ }\n"); 4025 shader_addline(buffer, "void order_ps_input() {\n"); 4026 generate_texcoord_assignment(buffer, vs, ps); 4027 shader_addline(buffer, "}\n"); 4006 4028 } 4007 4029 } else if(ps_major < 3 && vs_major >= 3) { … … 4637 4659 GL_EXTCALL(glUseProgramObjectARB(programId)); 4638 4660 checkGLcall("glUseProgramObjectARB(programId)"); 4661 4662 #ifdef DEBUG_misha 4663 { 4664 GLint programIdTest = -1; 4665 glGetIntegerv(GL_CURRENT_PROGRAM, &programIdTest); 4666 Assert(programIdTest == programId); 4667 } 4668 #endif 4639 4669 4640 4670 /* Load the vertex and pixel samplers now. The function that finds the mappings makes sure … … 4773 4803 GL_EXTCALL(glUseProgramObjectARB(program_id)); 4774 4804 checkGLcall("glUseProgramObjectARB"); 4805 #ifdef DEBUG_misha 4806 { 4807 GLint programIdTest = -1; 4808 glGetIntegerv(GL_CURRENT_PROGRAM, &programIdTest); 4809 Assert(programIdTest == program_id); 4810 } 4811 #endif 4775 4812 4776 4813 /* In case that NP2 texcoord fixup data is found for the selected program, trigger a reload of the … … 4795 4832 loc = GL_EXTCALL(glGetUniformLocationARB(*blt_program, "sampler")); 4796 4833 GL_EXTCALL(glUseProgramObjectARB(*blt_program)); 4834 #ifdef DEBUG_misha 4835 { 4836 GLint programIdTest = -1; 4837 glGetIntegerv(GL_CURRENT_PROGRAM, &programIdTest); 4838 Assert(programIdTest == *blt_program); 4839 } 4840 #endif 4797 4841 GL_EXTCALL(glUniform1iARB(loc, 0)); 4798 4842 } else { 4799 4843 GL_EXTCALL(glUseProgramObjectARB(*blt_program)); 4844 #ifdef DEBUG_misha 4845 { 4846 GLint programIdTest = -1; 4847 glGetIntegerv(GL_CURRENT_PROGRAM, &programIdTest); 4848 Assert(programIdTest == *blt_program); 4849 } 4850 #endif 4800 4851 } 4801 4852 } … … 4813 4864 GL_EXTCALL(glUseProgramObjectARB(program_id)); 4814 4865 checkGLcall("glUseProgramObjectARB"); 4866 #ifdef DEBUG_misha 4867 { 4868 GLint programIdTest = -1; 4869 glGetIntegerv(GL_CURRENT_PROGRAM, &programIdTest); 4870 Assert(programIdTest == program_id); 4871 } 4872 #endif 4815 4873 } 4816 4874
Note:
See TracChangeset
for help on using the changeset viewer.