Reproduction of the band gaps of semiconductors and insulators represents a well-known problem for standard DFT approaches based on semilocal functionals. The problem can be partly solved using hybrid functionals, in which a given portion of exact exchange is mixed with the DFT exchange. Recently, a new class of dielectric-dependent functionals has been introduced in which the amount of exact exchange is derived from the static dielectric function of a given compound. In this study we considered in a systematic way on an equal footing a set of 24 nonmagnetic three-dimensional (3D) bulk metal oxides and 24 quasi-two-dimensional (quasi-2D) semiconductors (oxides, hydroxides, chlorides, oxyhalides, nitrides, and transition metal dichalcogenides) and computed the corresponding Kohn-Sham band gaps with three global hybrid functionals and four range-separated hybrid functionals. These in turn were divided into standard (PBE0, B3LYP, HSE06, SC-BLYP) and dielectric-dependent (DD-B3LYP, DD-SC-BLYP, DD-CAM-B3LYP) functionals. We also performed a statistical analysis of the DFT data set along with structural parameters of these 2D and 3D materials. The surprising result is that overall there is no real improvement with the use of dielectric-dependent functionals compared to PBE0, HSE06, and B3LYP. Short-range DD-SC-BLYP gives a minor improvement in the band gaps for bulk metal oxides compared with standard SC-BLYP, but the mean absolute error is still 0.12 eV higher than with B3LYP. The use of dielectric-dependent standard or short-range functionals such as DD-B3LYP or DD-HSE06 worsens the situation. However, the dielectric-dependent version of the long-range-separated functional implemented with the Coulomb attenuating method (CAM), DD-CAM-B3LYP, leads to a clear improvement for band gaps of quasi-2D materials. On the basis of this analysis, the conclusion is that the use of a standard hybrid functional such as B3LYP or HSE06 is recommended for nonmagnetic bulk 3D metal oxides. On the other hand, the treatment of layered materials such as MoO3 or V2O5 benefits from the use of dielectric-dependent range-separated functionals.