Skip to content

Commit 56981b2

Browse files
committed
R_constants: Set the geometry shader constants.
1 parent 5e0c02d commit 56981b2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Layers/xrRender/blenders/Blender_Recorder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void CBlender_Compile::PassEnd ()
169169
proto.vs = RImplementation.Resources->_CreateVS (pass_vs);
170170
ctable.merge (&proto.ps->constants);
171171
ctable.merge (&proto.vs->constants);
172-
#if defined(USE_DX10) || defined(USE_DX11)
172+
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL)
173173
proto.gs = RImplementation.Resources->_CreateGS (pass_gs);
174174
ctable.merge (&proto.gs->constants);
175175
# ifdef USE_DX11

src/Layers/xrRenderGL/glr_constants_cache.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,47 +99,55 @@ class ECORE_API R_constants
9999
ICF void set (R_constant* C, const Fmatrix& A) {
100100
if (C->destination&RC_dest_pixel) { set(C, C->ps, A); }
101101
if (C->destination&RC_dest_vertex) { set(C, C->vs, A); }
102+
if (C->destination&RC_dest_geometry) { set(C, C->gs, A); }
102103
}
103104
ICF void set (R_constant* C, const Fvector4& A) {
104105
if (C->destination&RC_dest_pixel) { set(C, C->ps, A); }
105106
if (C->destination&RC_dest_vertex) { set(C, C->vs, A); }
107+
if (C->destination&RC_dest_geometry) { set(C, C->gs, A); }
106108
}
107109
ICF void set (R_constant* C, float x, float y, float z, float w) {
108110
if (C->destination&RC_dest_pixel) { set(C, C->ps, x, y, z, w); }
109111
if (C->destination&RC_dest_vertex) { set(C, C->vs, x, y, z, w); }
112+
if (C->destination&RC_dest_geometry) { set(C, C->gs, x, y, z, w); }
110113
}
111114

112115
// scalars, non-array versions
113116
ICF void set(R_constant* C, float A)
114117
{
115118
if (C->destination&RC_dest_pixel) { set(C, C->ps, A); }
116119
if (C->destination&RC_dest_vertex) { set(C, C->vs, A); }
120+
if (C->destination&RC_dest_geometry) { set(C, C->gs, A); }
117121
}
118122
ICF void set(R_constant* C, int A)
119123
{
120124
if (C->destination&RC_dest_pixel) { set(C, C->ps, A); }
121125
if (C->destination&RC_dest_vertex) { set(C, C->vs, A); }
126+
if (C->destination&RC_dest_geometry) { set(C, C->gs, A); }
122127
}
123128

124129
// fp, array versions
125130
ICF void seta (R_constant* C, u32 e, const Fmatrix& A) {
126131
R_constant_load L;
127132
if (C->destination&RC_dest_pixel) { L = C->ps; }
128133
if (C->destination&RC_dest_vertex) { L = C->vs; }
134+
if (C->destination&RC_dest_geometry) { L = C->gs; }
129135
L.location += e;
130136
set(C, L, A);
131137
}
132138
ICF void seta (R_constant* C, u32 e, const Fvector4& A) {
133139
R_constant_load L;
134140
if (C->destination&RC_dest_pixel) { L = C->ps; }
135141
if (C->destination&RC_dest_vertex) { L = C->vs; }
142+
if (C->destination&RC_dest_geometry) { L = C->gs; }
136143
L.location += e;
137144
set(C, L, A);
138145
}
139146
ICF void seta (R_constant* C, u32 e, float x, float y, float z, float w) {
140147
R_constant_load L;
141148
if (C->destination&RC_dest_pixel) { L = C->ps; }
142149
if (C->destination&RC_dest_vertex) { L = C->vs; }
150+
if (C->destination&RC_dest_geometry) { L = C->gs; }
143151
L.location += e;
144152
set(C, L, x, y, z, w);
145153

0 commit comments

Comments
 (0)