HLSL: nonfunctional: rename setId -> switchId, add comment
Method rename, add comment about its intended use. No test diffs.
This commit is contained in:
		
							parent
							
								
									bb79abccb3
								
							
						
					
					
						commit
						028c5a8dc4
					
				| @ -979,7 +979,6 @@ public: | |||||||
|         constSubtree(nullptr) |         constSubtree(nullptr) | ||||||
|           { name = n; } |           { name = n; } | ||||||
|     virtual int getId() const { return id; } |     virtual int getId() const { return id; } | ||||||
|     virtual void setId(int newId) { id = newId; } |  | ||||||
|     virtual const TString& getName() const { return name; } |     virtual const TString& getName() const { return name; } | ||||||
|     virtual void traverse(TIntermTraverser*); |     virtual void traverse(TIntermTraverser*); | ||||||
|     virtual       TIntermSymbol* getAsSymbolNode()       { return this; } |     virtual       TIntermSymbol* getAsSymbolNode()       { return this; } | ||||||
| @ -993,6 +992,10 @@ public: | |||||||
|     int getFlattenSubset() const { return flattenSubset; } // -1 means full object
 |     int getFlattenSubset() const { return flattenSubset; } // -1 means full object
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |     // This is meant for cases where a node has already been constructed, and
 | ||||||
|  |     // later on, it becomes necessary to switch to a different symbol.
 | ||||||
|  |     virtual void switchId(int newId) { id = newId; } | ||||||
|  | 
 | ||||||
| protected: | protected: | ||||||
|     int id;                      // the unique id of the symbol this node represents
 |     int id;                      // the unique id of the symbol this node represents
 | ||||||
| #ifdef ENABLE_HLSL | #ifdef ENABLE_HLSL | ||||||
|  | |||||||
| @ -2994,7 +2994,7 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc | |||||||
|         argTex->getWritableType().getSampler().shadow = shadowMode; |         argTex->getWritableType().getSampler().shadow = shadowMode; | ||||||
|         samplerType.shadow = shadowMode; |         samplerType.shadow = shadowMode; | ||||||
| 
 | 
 | ||||||
|         texSymbol->setId(newId); |         texSymbol->switchId(newId); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     txcombine->setType(TType(samplerType, EvqTemporary)); |     txcombine->setType(TType(samplerType, EvqTemporary)); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 LoopDawg
						LoopDawg