AddValidationLayer adds given validation layer, only if not already set returns true if added.
(ext string)
| 185 | // AddValidationLayer adds given validation layer, only if not already set |
| 186 | // returns true if added. |
| 187 | func (gp *GPU) AddValidationLayer(ext string) bool { |
| 188 | i := FindString(ext, gp.ValidationLayers) |
| 189 | if i >= 0 { |
| 190 | return false |
| 191 | } |
| 192 | gp.ValidationLayers = append(gp.ValidationLayers, ext) |
| 193 | return true |
| 194 | } |
| 195 | |
| 196 | // Config configures the GPU given the extensions set in InstanceExts, |
| 197 | // DeviceExts, and ValidationLayers, and the given GPUOpts options. |